Friday, September 24, 2010

C PRogramming Model Question Paper

Programming in C

Part A: Answer any 10 questions 2 x 10 = 20

1. What is an Algorithm?
2. What are the advantages of high level languages over machine language?
3. Give any two differences between compilers & interpreters.
4. Give any 2 differences between while statement and a Do- while statement in C?
5. What is an array? Define an array to store marks of 30 students in 3 subjects.
6. Write C statement to find maximum of two numbers using ternary operator.
7. What are preprocessor directives?
8. What are bitwise operators available in C?
9. Give any 2 two differences between Structures & Union.
10. What does a storage class mean? Mention different storage classes available in C.
11. List any 5 Date and time functions.
12. What are enumerated data types? Give an example.
13. What is recursion? What are its advantages?
14. Give any two differences between call by value and call by reference?
15. How do you pass parameters to main() function?

Part B: Answer any 6 questions 5 x 6 = 30

1. What are keywords? List the rules for naming a variable in C?
2. Write a C Program to print the following output using nested loops.
* *
* * *
* * * * *
* * * * * *
3. Draw a flowchart to solve a quadratic equation.
4. Write an algorithm to find the sum of numbers from 1 to N.
5. Write a program to read data from keyboard, write it to a file called INPUT, and read the same data from the INPUT file and display it on the screen.
6. Write a function to exchange the values of two variables, say x and y.
7. Demonstrate the usage of a switch statement with an example.
8. Explain the use of printf and scanf functions with all formatting facilities.

Part C: Answer any 3 questions 10 x 3 = 30

1. Write a program to read a line of text and output the number of words and characters in it.
2. Write a program to multiply 2 Matrices.
3. Write a program using pointers to read an array of integers and print its elements in reverse order.

4. Explain the different kinds of loops available in C with examples.
5. Define a structure data type called TimeStruct containing 3 members called hour, minute and second. Develop a program that would assign values to the individual members and display the time in the form 16:40:30

* * * * *


  1. In few days my first paper in c language i am confuse how to study easily the c language is easy but how to learn easily to solve the paper and get out off marks pls tell me how to learn basics and other about c language