Preboard Exam (IT 232: C Programming)
BIM – 1 Sem
st
Group A
Brief answer questions:
Attempt all questions. (10 X 1=10)
1. Define enum.
2. What is preprocessor directive?
3. Differentiate between getch() and getche()?
4. What is conditional operator?
5. Differentiate between break and exit().
6. How to initialize two-dimensional matrix?
7. What is function prototype?
8. What is the use of double pointer?
9. Differentiate between array and structure.
10. List out the different modes of file in file handling.
Group B
Short Answers Questions
Attempt any five questions. (5 × 3= 15)
11. Write a program to check if the input given by the user is divisible by 5 or 7.
12. WAP to check whether the integer entered by user is palindrome or not.
13. Write a program to read a line of text and display the number of vowels in it.
14. Write a program to print the following pattern:
5 5 5 5 5
4 4 4 4
333
22
1
15. Write a program to compute the factorial of number entered by the user using recursion.
16. Write a program to draw a rectangle using graphics function.
Group C
Long Answer Questions
Attempt any three questions. (3× 5= 15)
17. Explain the different logical operators in detail.
18. WAP to sort the elements of an array in ascending order.
19. What do you mean by dynamic memory allocation? Explain the use of malloc() and free()
functions with suitable example.
20. Write a program to create and write N numbers in a file “Number.txt”. Open this file to
then read its contents and write all positive numbers in the file “Positive.txt” and all
negative numbers in the file “Negative.txt.”
Group D
Comprehensive Questions
Attempt all questions. (2 × 10 = 20)
21. Why looping is used in programming? Explain different looping statements with appropriate
example.
22. What is structure? How is it different from union? Create a structure “Student” having data
members name, roll_nmber and percentage. Write a program to display the name of all
students having percentage greater than or equal to 80.