Date: 02/04/2018 Time: 3.00-5.00 PM: PCD Master Tutorials-Ii
Date: 02/04/2018 Time: 3.00-5.00 PM: PCD Master Tutorials-Ii
1. List the differences between the while loop and do-while loop. Write a C program to find
the sum and average of N natural numbers using for loop.
2. Write the syntax of all looping control statements. Explain how break and continue
statements are used in C program with example.
3. Write a C program to find the square root of a given number without using library
function.
4. Implement a C program to find the reverse of an integer number and check whether it is
palindrome or not.
5. Write a C program to find the factorial of a number using do-while where the number ‘n’
is entered by the user.
6. WAP to check if a number is prime or not.
7. WAP to find the sum of even numbers and odd numbers in the range m to n.
8. What is an array? Explain the declaration and initialization of one dimensional array.
9. Explain the declaration and initialization of two dimensional array.
10. Program to find given key element in an array of n integer elements using Linear Search
11. Write a C program to evaluate the polynomial f(x) = a4x4 + a3x3 + a2x2 + a1x + a0, for a
given value of x and its coefficients.
12. What is a String? How strings are declared and initialized in C programming
13. Explain string manipulation functions with usage of them in a programming.
a. strcpy
b. strcmp
c. strcat
d. strlen
e. strlwr
f. strupr
g. strrev
14. Explain String input and output functions.
15. What is Function? Explain function definition, function call and function declaration with
example?
16. Explain different categories of function based on the parameters?
17. Write a program to find factorial of a given number using function?
18. Write a program to perform mathematical operations using function?