CP Lab-6 [ Array based Question]

Post date: Oct 29, 2017 10:01:26 AM

1.Write a C program to read 5 subjects marks of a student and calculate his/her Total and Average using arrays. And print the result as following criteria Average > 80% print DISTINCTION, Average >69 & <79 print CLASS I, Average >59 & <68 print CLASS II, Average >49 & < 58 print CLASS III, Average >38 & < 48 print AVERAGE and if Average below 37% print FAIL 2.Write a C program to read two mark lists of equal size (10 size) and check whether they are identical or not. E.g. mark list 1 : 22 33 44 55 66 mark list 2 : 22 33 44 55 66 Output : Identical 3.Write a C program to read 10 integers from user, store them in an array. Ask user to enter a search key (integer). Search the search key entered by user in the array elements and print appropriate message. E.g. Enter 10 integers: 15 26 59 14 72 22 39 85 3 91 Enter search key: 39 Output: Search key 39 found at location 7.