C Programming
Full Marks: 60
Pass Marks: 24
Time: 3 hours
Draw the flowchart for the solution of a quadratic equation and write an algorithm and explain it
Find the value of “a” in each of the following statements:
int i = 2, j = 5, k = 7;
float a = 1.5, b = 2.5, c = 3.5;
(a) a = c – i/j + c/k ;
(b) a = (c – i)/k+( j+ b)/j ;
(c) a = b * b - (( i + j )/c);
(d) a = b – k + j/k +i *c;
(e) a = c + k % 2 +b;
(f) a = ( b+ 4) % ( c + 2);
A machine is purchased which will produce earning of Rs. 20000 per year while it lasts. The machine costs Rs. 120000 and will have a salvage value of Rs. 20000 when it is condemned. If the 12 percent per annum can be earned on alternative investments what should be the minimum life of the machine to make it a more attractive investment compared to alternative investments?
Write a program to transpose the following matrix
Write a program that uses a do…while loop to compute and prints the sum of squares given n numbers.
Write a function to multiply two n x n matrices.
Write a program to count the number of words in a sentence.
Why pointer is called jewel of C language? Write a program that uses pointers to copy an array of integer.
OR
Explain the importance of pointer. Write a function that is passed an array of pointers to floats and returns a newly created array that contains those float values
Define a structure of student having data members, name, address, marks in C language, and marks in information system. Take data for students in an array dynamically and find the total marks obtained.
Some text file is given; create another text file replacing the following words “Ram” to “Hari”,“Sita” to “Gita”, and “Govinda” to “Shiva”.
OR
What are the uses of graphical function? Explain the basic graphical function with suitable program.