Sample Paper for C- programming
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?
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.
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