Structured Programming Approach - Dec 2016
First Year Engineering (Semester 2)
TOTAL MARKS: 80
TOTAL TIME: 3 HOURS (1) Question 1 is compulsory.
(2) Attempt any three from the remaining questions.
(3) Assume data if required.
(4) Figures to the right indicate full marks. 1(a) Explain the significance of pointers in C(4 marks) 1(b) What is an algorithm? How do you develop an algorithm?(4 marks) 1(c) Explain the following statement with example:
ii) break(4 marks) 1(d) Explain any two functions of string .h(4 marks) 1(e) Explain the following functions-floor(),
trunc(), squrt()(4 marks) 2(a) Write a program to display prime numbers between 1 to 1000(5 marks) 2(b) What is recursion? Write a program to compute fibonacci series using recursion.(5 marks) 2(c) Write a C program to add two distances(fcet-inch system) entered by user, using structures(10 marks) 3(a) Write a C program to check if the given number is a palindrome or not(6 marks) 3(b) Write a C program to print following E
E D C
E D C B
E D C B A(6 marks) 3(c) Write a program to calculate sum of digits of a given n digit number using recursion(8 marks) 4(a) Write a program to sort given 10 numbers in ascending order(10 marks) 4(b) Write a program to calculate the sum of following series:
+ (5!/5) + ....(n!/n)(10 marks) 5(a) Write a program to compure matrix multiplications and transpose of a matrix(10 marks) 5(b) Write a program to count number of vowels and consonants in a given sentence(10 marks) 6(a) Explain the difference between call by value and call by reference with example(8 marks) 6(b) Explain different storage classes(8 marks) 6(c) What is a file? Explain the following file handling function in c-fopen(),