Problem Solving Using CMarch 2018
Problem Solving Using CMarch 2018
Problem Solving Using CMarch 2018
-·--·····--····-·--····
Reg. No.·-··---·----·-··-······-·
int main()
{
const int a = 5;
}
(a) a= 5. (b ) a= 10.
Tuna over
2 D 52730
int main()
{
int i=lO;
int *p=&I;
printf("%d\n", *p++);
}.
10. A ---- is a collection of data items under one name in which the items share the same
storage.
(10 X 1 = 10 marks)
PartB
13. Write the general form of conditional operator and explain the evaluation procedure.
PartC
16. Write an algorithm and draw a flowchart to find first and second largest of n numbers?
17. Write a program to compute the sum of digits of a given integer number to a single digit ?
18. Explain the concept of call by value and call by reference with suitable examples ?
22. What are pointers ? Explain how to perform arithmetic operations on pointers ?
24. Explain the different types of data types available in Cwith examples.
27. Write a recursive function to generate and print first n Fibonacci numbers.
28. What are pointer expressions ? Write a program using pointers to compute the sum of all elements
stored in an array.
29. Write a program to merge two sorted array in to a single sorted array in ascending order.
30. What are Preprocessor directives in C? Explain various forms of macro substitution.
31. Write a program that appends one file at the end of another file.
(5 x 8 = 40 marks)