0% found this document useful (0 votes)
39 views

Assignment Questions

This document outlines topics covered in Module 2 and Module 3 of a C programming course. Module 2 discusses evaluating expressions, if/else statements, switch statements, writing a program to check for a leap year, loops, break and continue statements, and writing a program to check if a number is a palindrome. Module 3 defines functions, parameter passing techniques, recursion, writing recursive programs to print Fibonacci series and find factorials, arrays, searching and sorting algorithms, and matrix operations.

Uploaded by

Pawan S
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Assignment Questions

This document outlines topics covered in Module 2 and Module 3 of a C programming course. Module 2 discusses evaluating expressions, if/else statements, switch statements, writing a program to check for a leap year, loops, break and continue statements, and writing a program to check if a number is a palindrome. Module 3 defines functions, parameter passing techniques, recursion, writing recursive programs to print Fibonacci series and find factorials, arrays, searching and sorting algorithms, and matrix operations.

Uploaded by

Pawan S
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

MODULE 2

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.

You might also like