HSEB || Model question of Computer Science Class 12 (Computer Science, CS, Management, Programming C)

Unit -4 Programming in C

computer science, cs, management, programming c

Long answer questions

1. a. Describe the switch statement with example. [5]

b. What are the difference between while and do while loop? Explain with syntax. [3+2]

2. Write a program to read five positive number using array and find out the smallest among them. [10]

3. a. Describe the string manipulation function in C. Explain strcpy and strcmp with example. [2+3]

b. Write a program do demonstrate the value of variable and address of variable using pointer in C. [5]

4. Describe the function in C. Write a program to find the sum of ‘n’ integer number using function in C. [4+6]

5. Differentiate between structure and union. Write a program to input the employee name and post of five employees and display the records in proper format using structure. [3+7]

6. a. What is loop? Differentiate between while and do-while loop. Describe with example. [1+4]

b. Write a program to display first ten even nos. [5]

7. What is string? Explain any four string handling functions with example. [2+8]

8. What is array? Write a program to sort twenty integer nos. in ascending order. [2+8]

9. a. Write a program to add two integer nos. using function. [5]

b. Define simple and compound statements. Describe logical operator with example. [5]

10. a. What is pointer? Write its advantages. [5]

b. Write a program to enter name, post and salary of employee and write it in a file “employee.dat”. [5]

11. Write a program which find the sum, difference and product of 2 numbers using switch case statement. [10]

12. a. Differentiate between while and Do-while loop with appropriate example. [2.5+2.5]

b. Write a program to display the following: [5]

1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 13. a. What is function? List out the advantages of functions. [1+4]

b. Write a program to find the factorial of a given number. [5]

14. a. Describe fscant and fprint function. [5]

b. Write a program which asks name, age, roll-number of student and write it in a file student.dat. [5]

15. a. What is looping? Describe ‘for’ and while loop with appropriate examples. [1+2+2]

b. Write a program to check if a given number is odd or even using if statement. [5]

16. Describe any five string handling functions with examples. [10]

17. What is array? Write a program to find addition of two matrices (3×3). [2+8]

18. a. Differentiate between Structure and Union. [2.5+2.5]

b. Write a program to display name, age and address reading from file “record.dat”. [5]

19. a. Write a program which reads name, department and age from a file named ” employee.dat” and display them on the monitor. [10]

20. What are the data types available in C programming? Explain in detail with examples. [10]

Computer Science Class 11

Travel and Tourism Class 11





Hemant Chaudhary is an student 19 years old. He is interested in Hacking, Blogging,coding. He like to Visit new Places and make new Friends. He used to Learn His web works From Friends and Currently is is CEO and Founder of Meropaper and meroreview.com