Assignment Questions
Assignment Questions
1. Evaluate the expressions using the precedence chart: Given int a = 0, b = 1, c = -1;
a. a += b - = c *= 10.
b. - - a * (5+b) / 2 – c ++ * b.
2. Explain the one way selection statement (if) in C language with syntax, flowchart and
example.
3. Explain the two way selection statements (if-else, if-else-if)in C language with syntax,
flowchart and example.
4. Explain the switch statement with syntax and example.
5. Design and develop a C program to read a year as an input and find whether it is leap year or
not. Also consider end of the centuries.
6. Explain the different types of loops in C with syntax and example.
7. Explain the use of break and continue statement in loops with example.
8. List the Difference between while loop and do-while loop.
9. Design and develop a C program to reverse an integer number NUM and check whether it is
PALINDROME or NOT.
MODULE 3
1. Define function? Explain the declaration of function with example?
2. Explain the two parameter passing techniques used in functions.
3. Define recursion? Explain the recursion with example.
4. Write a program to print the Fibonacci series using recursion.
5. Write a C program to find factorial a given number using recursion.
6. Given an array, float avg[ ]={99.0,67.0,78.0,56.0,88.0,90.0,34.0,85.0}. Calculate the address
of avg[4] if base address= 1004.
7. Write a C Program to INSERT an element in an array at a particular position using algorithm.
8. Write a C Program to DELETE an element in an array at a particular position using algorithm.
9. Write a C Program to search the ‘key’ element in an array using linear search algorithm.
10. Write a C Program to search the ‘key’ element in an array using binary search algorithm.
11. Write a C Program to read and display 3x3 matrix.
12. Write a C program to transpose a 3x3 matrix.