Gujarat Technological University
C.K.Pithawala College of Engineering and Technology
Subject: PPS (3110003)
Question Bank
UNIT: 1
1. Define algorithm and explain different symbols used in flowchart.
2. Write an algorithm for finding odd and even number from given two numbers.
3. Write flowchart or algorithm to find area of a triangle.
4. List out types of software with Examples.
5. Explain flow chart with suitable example.
6. Recall the definitions of (I) Assembler (II) Compiler (III) Interpreter
7. Write a menu driven C program for simple calculator. Also draw flowchart.
8. Name the major components of computer system and give their function.
9. List out types of software with Examples.
10. Define algorithm and explain different symbols used in flowchart.
11. Draw a flow chart that shows how to find root of quadratic equation ax 2 +bx+c.
12. Categorize the major components of computer system and give their function.
13. List all symbols used in flowchart and draw flowchart to find factorial number.
14. Draw all symbols used in flowchart and draw flowchart to find factorial number.
15. Write an algorithm and draw a flowchart to print first N Fibonacci numbers.
16. Develop an algorithm to print first N Fibonacci numbers.
17. What is Software and Hardware? Explain different types of Software.
18. Draw a flow chart to do the sum of 10 elements read from the user.
19. Define: algorithm, flowchart, compiler.
UNIT: 2
1. Write a program to find the sum of first N odd numbers.
2. Describe local and global variable with example.
3. List out the categories of functions of C. Explain any one category with example.
4. What is difference between keywords and identifiers? Explain rules for naming an
identifier.
5. Write a program to reverse a given number.
6. List out the operators used in C language and explain any three with example
7. Explain Derive data types.
8. Describe the four basic data types. How could we extend the range of values they
represent?
9. Define variable and constant. Explain different types of constants.
10. Write code to find out largest of 2 numbers using ternary operator.
11. What are header files? Name at least 3 with its usage.
12. Write a program to find 1+1/2+1/3+1/4+....+1/n.
13. What is formatted output? Using printf() statement explain it.
14. Write a program to check whether entered character is vowel or not?
15. Write a program to print all Armstrong numbers in a given range. Armstrong
number is equal to sum of cubes of its individual digits. For example 153 = 1^3 +
5^3 + 3^3. So, 153 is Armstrong number.
16. Explain getch(), getchar(), gets(), puts()
17. Briefly discuss about scope of variable.
18. Write a C program to display prime number between 1 to 100.
19. Develop an application program to convert and print distance between two cities 07
in meters, feet, inches & centimeters. The distance between two cities (In KM) is
input through key board.
20. What do you mean by type conversion? Why is it necessary?
21. Write a program that reads two numbers from key board and gives their addition,
subtraction, multiplication, division and modulo.
22. Implement a C Program to convert temperature from Fahrenheit to Celsius and vice
versa.
23. Explain different types of constants.
24. Distinguish between the following pairs: “getchar” and “scanf” functions.
25. “%s” and “%c” specifications for reading.
26. Distinguish the data types provided by C programming language.
27. Write a program to find sum of first N odd numbers. Ex. 1+3+5+7+...........+N
28. Explain getch(), getchar(), gets().
29. Show the important of stdio.h header file.
30. List the header files used in c Programing with their properties.
31. Discuss about various operators used in C language.
32. Explain different type of operators used in c language with their precedence and
associativity.
33. Describe precedence and associativity of operators with example.
34. List all operators used in C and explain any three with example.
35. What do you mean by type conversion? Give example.
UNIT: 3
1. Write a program to select and print the largest of the three nos. using nested-if-else
statement.
2. Explain entry control loop and exit control loop with example.
3. Explain for loop with example.
4. Explain while loop with example.
5. Write a program in ‘C’ to print the following pattern
1
23
456
78910
6. Explain different loops used in c language .Write the difference between while loop
and do...while loop.
7. List down three constructs for performing loop operations in C language. Write
general form of same.
8. Write a C program to input an integer number and check last digit of number is even
or odd.
9. Explain: 1. Nesting if-else statement 2. Use of break statement
10. Write a program in ‘C’ to print the following pattern using loop statement.
1
22
333
4444
55555
11. Explain various looping control structures with suitable example.
12. Define general form of 1) do while loop 2) Nested if 3) goto
13. Explain break and continue statement with example.
14. Discuss general form of following decision – making statements.
(I) IF (II) SWITCH (III) GOTO
15. Develop a simple program to Add, subtract and multiply two numbers using switch
statement.
16. Explain various types of loop available in C with example.
17. Write a program to print the following pattern.
*
**
***
****
18. Explain switch case statement with example to read number between 1 to 7 and
print relatively day Sunday to Saturday.
19. Construct ‘C’ program to print the following pattern using loop statement.
1
22
333
4444
55555
UNIT: 4
1. Write a program to reverse the input string.
2. Write a program to find out the largest of an array.
3. Discuss initialization of one-dimensional arrays with example.
4. Write a C program to read 10 numbers from user and store them in an array.
Display Sum, Minimum and Average of the numbers
5. Write a program in c for multiplication of two matrix.
6. What is array? Give example and advantages of array.
7. Show 1D array declaration, initialization and iteration.
8. Write a program to find a character from the string, string and character to be
searched both will be given by user.
9. Explain following string manipulation functions. strcmp( ), strlen( ), strcat( ), strstr( )
10. What is a string? Explain at least 4 built-in string functions with example.
11. What is an array? Explain one dimensional and two dimensional array declarations
and initialization with suitable example.
12. Why null value is used in string? Justify your answer with example.
13. What is array? Give example of array.
14. What is string? In how many ways can you accept data in a string?
15. Write a program to accept a string and count the number of vowels
16. present in a string.
17. What is string? Explain with example to find a character from string.
18. Describe array with example.
19. What is String? How are they declared and also define the null character
20. Write a C program to multiply two N X N Matrix.
21. Write a program to count total words in text.
22. Why it is necessary to give the size of an array in array declaration?Write a program
to display transpose of given 3*3 matrix.
23. Explain how string is defined in C. List the various inbuilt string functions.
24. Write a C program to read 10 numbers from user and store them in an array.
25. Display Sum, Minimum and Average of the numbers.
UNIT: 5
1. Create a function to swap the values of two variables.
2. What is function? Explain the function definition, function prototype and function call
with relative example.
3. Explain different type of functions used in c language. Write a program using
function to find maximum if two numbers.
4. Explain how structure variable is initialized with suitable example.
5. In user defined function, what is actual argument and formal argument?
6. Discuss parameter passing technique used in C with example.
7. Create a function to check number is prime or not. If number is prime then function
return value 1 otherwise return 0.
8. Classification of User defined function’s components (elements).
9. What is UDF? Describe advantages of UDF.
10. Write a program to calculate nCr using user defined function. nCr = n! / (r! * (n-r)!) 3
11. Explain the function definition, function prototype and function call with relative
example.
12. What is user-defined function? Explain actual argument and formal arguments.
13. Explain function declaration, function definition and function call.
14. Write a function which takes 2 numbers as parameters and returns the gcd of the 2
numbers. Call the function in main().
15. Write a program using pointer and function to determine the length of string
16. Recall and describe different “categories of functions”.
UNIT: 6
1. Define recursion. List the advantages of recursion.
2. What care must be taken while writing a program with recursive function?
3. List the advantages of recursion.
4. What do you mean by recursive function? Write a program in c to find factorial of a
number using recursive function.
5. What is recursive function? Explain with suitable example.
UNIT: 7
1. What is pointer? Give its benefits. Write a program to do swapping of two elements
using function with two pointers as arguments.
2. What is pointer? Explain with example to print the address of variable using pointer.
3. What is pointer? Explain how pointers are declared and initialized. State its
advantages.
4. What is pointer? Which arithmetic operations are valid on pointers?
5. What is pointer to pointer? Write suitable example to demonstrate the concept.
6. Explain call by value (pass by value) and call by reference (pass by reference) with
examples in brief.
7. What is pointer? Which arithmetic operations are not valid on pointers?
8. Explain array of pointers with suitable example.
9. What is a pointer? How is a pointer initialized?
10. Write a program to read n different integer numbers from keyboard and calculate
the sum using pointer.
UNIT: 8
1. Distinguish between Structure and Union.
2. Explain nested structure and array of structure with example.
3. What is structure? How to access the elements of structure? How to calculate size
of structure? Explain with example.
4. What is structure? Explain with example how to declare a structure and how to
initialize it.
5. Define a structure data type called time_struct containing three member’s
integer hours, minutes, second. Develop a program that would assign values to
individual member and display the time in following format : HH:MM:SS
6. Define a structure called cricket that will describe the following information:
a. Player name
b. Team name
c. Batting average
7. Write a program in c using structure to enter rollno, marks of the three subject for 3
student and find total obtained by each student.
8. Distinguish between “structure” and “array”. Discuss the meaning and purpose of
following: (I) struct keyword (II) typedef keyword (III) sizeof operator.
9. Which type of problem can be solved by structure? Explain it with C program.
10. Define a structure “personal” that would contain person name, date of
joining and salary. Using this structure read information of 5 people and
print the same on screen. Also display sum of salary of all 5 people.
11. Show structure declaration and initialization with proper syntax.
12. Explain with suitable example structure variable and pointer to structure variable.
UNIT: 9
1. Explain dynamic memory allocation.
2. Explain the use if malloac and calloc function with their syntax.
3. What is dynamic memory allocation? Explain important functions associated with it.
4. What is dynamic memory allocation? Show the use of malloc() and calloc() function
with their syntax.
5. Show the usage of malloc( ) and calloc( ) with syntax.
UNIT: 10
1. Describe file management? Recall various file modes.
2. Explain fopen() and its mode with example to write a string into file
3. Write a program to illustrate the use of fputc ( ) and fputs( )
4. Describe file management. And List the various file management functions.
5. Distinguish between the following functions:
(I) “getc” and “getchar” (II) “printf” and “fprintf” (III) “feof” and “ferror”.
6. Write syntax of fseek() function and explain fseek(fp,-10,1) and 04
fseek(fp,10,0).
7. What is a file? List the various file handling operations in c.
8. Explain various file management function in C.
9. Explain fopen ( ) and fclose ( ) file handling functions