Professional Documents
Culture Documents
2nd Year Final Exam (A)
2nd Year Final Exam (A)
1. In real world give 4 examples where we are using the C- Programming [1]
3. What is the meaning of #include<stdio.h> ? Define each part of the statement. [1]
5. Print the following structure with the help of for loop [2]
****
***
**
*
6. Write a program in C for factorial of a given number. The number is input by the user and
containing the integer type value. [2]
8. What is the difference between call by value and call by reference? [1]
9. What is the default value of register variable? [1]
a. garbage
b. 0
c. 0x0 (hexadecimal zero)
d. Not sure
10. Write a program in C to calculate all prime numbers between 1 and 50. [3]
11. What is the meaning of array in C? What are the types of array? Explain in brief and Give an
example of integer type of array. [3]
12. What will be the highest precedence operator among the following.. [1]
a. ~
b. &&
c. ( )
d. ++
13. Define function in C. Make a function AREA() to calculate the area of a circle. [2]
15. Give a flow chart for even and odd number program. [2]
16. What are the largest and smallest values that can be reliably stored in a variable [1]
of type int?
17. What is the difference between getch(), getche() and getchar() ? [3]
20. What is the storage class in C ? Define it with all its members. [2]
22. Write a program to print the numbers from 1 to 10 and their squares: [2]
1 1
2 4
3 9
.. .
10 100
23. A- What is the difference between Structure and Union? Explain with example? [5]
B- What is the numeric value of the expression 3 < 4?
24. Under what conditions will this code print ``water''? [3]
if(T < 32)
printf("ice\n");
else if(T < 212)
printf("water\n");
else printf("steam\n");
25. A- Write a program to print all the ASCII values and their equivalent characters using a [4]
while loop. (The ASCII values vary from 0 to 255).
B- Difference between break and continue ?