CP Question Bank Unit 1 To 6
CP Question Bank Unit 1 To 6
Unit 1
1) What are the various block of standard C program? Explain each with example.
2) Explain C program execution life cycle with neat block diagram.
3) What is keyword in C.
4) Explain the variable with example.
5) What is an escape sequences?
6) Explain C Tokens.
7) Define following terms: a)Variables b) Keywords c) Compiler
8) Explain different types of operator with example.
9) Explain increment and decrement operator with example.
10) Explain reading and writing character with example.
11) Explain various data types in C.
12) Explain the printf() and scanf() with example.
Unit 2
Unit 4
1) Explain string handling function with example.
2) List and explain different library function for string manipulation with suitable example.
3) Write a program to count a character ‘a’ that appears in the string “aabbaa” for no of times.
4) Write a program to count a character ‘e’ that appears in the string =“Engineering” for no of
times.
5) Explain arithmetic operation on character with example.
6) Write program to count vowels in a string.
Unit-5
1) Explain pointers along with its uses.
2) Write a C program for factorial function which calculates factorial of N number.
3) What is a function in c? Explain with example call by value mechanism
4) Explain indirection operator ‘*’.and address of operator ‘&’ with suitable example.
5) Write a program to design function sum which calculate the addition of two integer nos.
6) What is pointer? What kind of information does the pointer variable represent? Explain
different uses of pointer.
7) Write a program to swap two integer number using pointers.
8) Explain pointer arithmetic with suitable example.
9) Explain the following with example. a)Pointer to pointer b) pointer to function
Unit-6