Important Questions Computer Programming: C
2 Marks:
Write a C program to check whether the given number is positive or negative.
Differentiate break and continue statement in C programming language with program.
What is the difference between the statements a=5 and a==5 in language. Give one example
What is function? Declare a float array of size 5 and assign 5 values to it.
What is pointer? How is pointer variable initialized.
Write a C program to check whether the given number is even or odd
Differentiate recursion and iteration statement in C programming language with program.
What is the relation between the operators ‘&’and’*’ in C Pointers. Give example.
What is parameter? Compare actual parameters and formal parameters.
How is a character string declared? Declare a character array of size 5 and assign vowels to it.
15 Marks
Explain Nested if else and ‘switch - case’ with appropriate programs.
What is an array? Explain two-dimensional array with declaration and initialization and Write a C
program for
matrix transpose.
Write short notes on function prototype and function declaration and explain with a c program to add
and subtract
three numbers using functions.
Explain any five string library functions with separate program.
Enumerate the difference between ‘else – if ladder’ and ‘switch - case’ with appropriate programs.
Explain the pass by value and pass by reference. Write a c program to swap the content of two
variables using pass by value and pass by reference.
What is recursion? Write a c program to find the factorial of a given number using recursion.
Explain about pointers and write the use of pointers in arrays with suitable examples.
What is an array? Explain one dimensional array with declaration and initialization. Write a C
program to multiply two matrices (2D array) which will be entered by user.
Write about the significance of header,’string.h’ and write short notes on any three string functions
with separate program.
10 marks
1)What is the purpose of a looping statement? Explain in detail about the operation of various
looping statements in C with suitable examples.
Explain pointer arithmetic in detail with examples.
2) What is recursion? Write a c program to find the Fibonacci series of a given number using
recursion.
Define iterative statement. Explain while and do while with a separate program