PPS Question Bank
PPS Question Bank
Module 1 and 2
1.Give difference between compiler & interpreter.
2. Give the difference between a while statement and a Do- while statement in
C?
3.Demonstrate the usage of a switch statement with an example.
4.Explain the different kinds of loops available in C with examples.
5.What are operators? Explain different types of operators in C?
6.What is a branching statement? Explain various types of branching.
(ii) Constant
(iii) Variable
10.What is a loop? Explain various types of loop with syntax and example.
11.Write short notes on printf() and scanf() functions. What are the different ways you
can write?
a)Break statement
b)Continue statement
c)Goto statement
d)nested if else
17.Write c program to print table for the given number using for loop.
(153=1*1*1+ 5*5*5+3*3*3)
**
***
****
*****
Module 3 and 5
3 marks Questions
1. Difference between string and Array.
2. Syntax for string and array.
3. Explain four string functions which are available in the library.
4. What is prototype function.
5. How to pass arguments to a function.
6. How to initialize 2-D array
7. What is a relation between ARRAYS and pointers? Explain with example
8. For what purpose ‘\0’ is used in string operations explain with suitable
example.
9. Explain sizeof operator with example.
10. What are the Different ways to initialize strings.
11. What is the output of the following program.
#include <stdio.h>
int main()
{
int num[] = {2,8,7,6,0};
int i;
for (i=0;i<5;i++) {
printf(“\n Array Element num [%d] = %d”,i, num[i]); }
return 0; }
12. What is function.Difference between user defined function and library function.
13. What is prototype function.
7 or 8 Marks Questions.
1. State and explain different types of string functions with example.
2. Define array. Explain different types of array in detail.
3. Write a C language program to enter n elements in array and find
second largest number from array.
4. Write a C language program to read two matrices and add
them.
5. Write Program to print the accepted string using gets() and
puts().
6. Program to convert lowercase to uppercase and uppercase to
lowercase using string function.
7. What are the advantages and disadvantages of using an array.
8. Define string. How string is declared and initialized ? Explain
string input/output functions with an example.
9. Write a C Program to implement string copy operation
STRCOPY(str1,str2) that copies string str1 to another string str2
without using library function.
10. Write a C program to concatenate two strings without using
built-in function strcat().
11. Differentiate between call by value and call by reference with
examples.
12. Explain function call, function definition and function prototype
with examples.
13. Write a program in „C‟ using functions to swap two numbers .
14. Explain two categories/types of argument passing techniques,
with examples .
15. Explain Functions with no arguments and no return value.
16. Explain Functions with arguments and no return value.
17. Explain Functions with arguments and return value.
18. Explain Functions with no arguments and return value.
Module 6, 7 and 8
Programs:
Program to calculate sum of all the even numbers between 1 and 100.