Computer Prog_Compre
Computer Prog_Compre
47 3 66 32 56 92
After two passes of a sorting algorithm, the array has been rearranged as shown
below:
1d Write a c program to find total size of a file using ftell and fseek functions 4
1e Write a function HasZeroDiagonal that, given a 5-by-5 integer array, returns 1 if all 3
the elements on the main array diagonal are zero and returns 0 otherwise.
2a Write a C program to calculate and display the sum of the contents of an array using 5
pointer arithmetic.
2b Write a a function to reverse the links in a linked list such that the last node becomes 5
the first and the first becomes the last by traversing the linked list only once
Page 1 of 3
Question Paper Pattern is NOT fixed. The paper is for reference only
3b Write a C program to delete(remove) all duplicate integer values from an array .After 5
performing delete operation the array should only contain unique integer value.
Example:
If elements of array are: 10, 20, 10, 1, 100, 10, 2, 1, 5, 10
After removing all duplicate elements
Elements of array are: 10, 20, 1, 100, 2, 5
Conditions: 1 ≤ T ≤ 100
1 ≤ N ≤ 10000
Inputs: The first line contains an integer T, total number of testcases. Then
follow T lines, each line contains an integer N.
Output: Display the smallest number of notes that will combine to give N.
Page 2 of 3
Question Paper Pattern is NOT fixed. The paper is for reference only
Example:
Input
3
1200
500
242
Output
12
5
7
XXXXXX
Page 3 of 3