July 2021
July 2021
1.a) What is the difference between declaration and definition of a Variable? Give examples.
HH
b) How is do-while loop differ from while loop? Explain with suitable example code.
[7+8]
2.a) State the purpose of type casting and type conversion.
UU
b) Mention the pros and cons of using ‘goto’ statement in a C program.
c) List and explain various storage classes used in C program. [5+5+5]
Sse
3.a) Using two dimensional array, write a C program to find the transpose of a 2×2 matrix.
b) Demonstrate the usage of pointers in self referential structures using an example C
edd
code. [7+8]
4. Explain the usage of structures for illustrating the case study of maintaining
examination marks records of students in a class. [15]
JJUu
5. Demonstrate the following functions with a correct syntax and code:
a) fopen( ) b) fprintf( ) c) fscanf( ) [5+5+5]
Ll/A/
6.a) Write a C program that copies the integer contents of a binary file to another file.
b) Write a C program to use conditional compilation directive to find whether an identifier
Auu
is defined or not. [8+7]
7. Illustrate the concept of passing arrays to functions with relevant example program.
gg-
[15]
2-21
8.a) Write an algorithm for finding roots of a quadratic equations.
b) Explain how bubble sort works and also mention its time complexity. [7+8]
1
---ooOoo---