1(a)
Define Pseudo code. Write a Pseudo code to find sum and average of given three numbers .
5 M
1(b)
What is an identifier ? What are the rules to construct identifier ? Classify the following as Valid /invalid Identifiers.
i) num2
ii) $num1
ii) +add iv) a-2
i) num2
ii) $num1
ii) +add iv) a-2
6 M
1(c)
Write a C program to find area of rectangle.
5 M
2(a)
Explain print and scant functions with example.
4 M
2(b)
List all the operators used in C. Give examples.
8 M
2(c)
Write the output of the following C code
i) void main ( )
{
int a =5, b=2, res1 ;
float f1 = 5.0, f2 = 2.0, res2;
res1 = 5/2.0 + a/2 + a/b;
res2 = f1/2 * f1-f2 ;
print f ("res1 = %d res2 = %f ", res1,res2) ;
}
ii) void main ( )
{
int i = 5 , j = 6 , m, n;
m = ++ i + j ++ ;
n - - - i + j - - ;
printf ("m =%d n = %d" , m, n) ;
}
i) void main ( )
{
int a =5, b=2, res1 ;
float f1 = 5.0, f2 = 2.0, res2;
res1 = 5/2.0 + a/2 + a/b;
res2 = f1/2 * f1-f2 ;
print f ("res1 = %d res2 = %f ", res1,res2) ;
}
ii) void main ( )
{
int i = 5 , j = 6 , m, n;
m = ++ i + j ++ ;
n - - - i + j - - ;
printf ("m =%d n = %d" , m, n) ;
}
4 M
3(a)
List all the conditional control statement used in C . write a C program to find the biggest of three numbers.
8 M
3(b)
Write a C program to find the reverse of an integer number NUM and check whether it is PALINDROME or NOT .
8 M
4(a)
Explain the switch satement with syntax and example .
8 M
4(b)
List the difference between the while loop and do - while loop . Write a C program to find sum of Natural numbers from 1 to N using for loop .
8 M
5(a)
What is an array? Explain the declaration and initialization of single and double dimensional arrays with example .
8 M
5(b)
Write C program to search a name in a list of names using Binary searching technique.
8 M
6(a)
Explain any Five string manipulation library functions with example.
8 M
6(b)
Write a C program to read N elements and find biggest element in the array.
8 M
7(a)
What is structure? Explain the syntax of structure declaration and initialization with example.
5 M
7(b)
Write a C program to maintain a record of ' n ' employee detail using an array of structures with three fields (id, name, salary) and print the detail of employees whose salary is above 5000.
7 M
7(c)
Explain fprint and fscanf functions with syntax.
4 M
8(a)
Explain structure with in a structure with an example.
7 M
8(b)
What is a file ? Explain fopen and fclose functions.
5 M
8(c)
Explain fgets and fputs functions.
4 M
9(a)
What is a pointer ? Explain how the pointer variable is declared and initialized.
4 M
9(b)
Explain any two preprocessor directives in C with example.
6 M
9(c)
Write a C program to swap two numbers using call by pointers (address) method.
6 M
10(a)
What is dynamic memory allocation ? Write and explain the different dynamic memory allocation functions in C.
6 M
10(b)
Explain stack and Queue data structures along with their application.
6 M
10(c)
Explain how pointers and arrays are related with example.
4 M
More question papers from Programming in C and Data Structures