Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Principles of Programming using C

[23ESCS11]
QUESTION BANK

Module 1: Looping, Functions and Arrays

Sl. Questions Marks


No
1 Illustrate different loops used in C program along with syntax, flowchart
and examples. 10
2 Distinguish between while loop and do-while loop with example.
8
3 Show how break and continue statements are used in a C program, with
10
Syntax and example
What is array ? Explain the declaration ,initialization and Accessing of one
5 dimensional and two dimensional array with an example. 10
Write a C program for [consider integer data]
6 (i) Bubble sort (ii) Linear search iii)Binary search 10

a. List the different operations that can be performed on arrays. Also,


5
7 Develop a C program to add two matrices using two dimensional arrays.
b. Develop a C program to find the largest element in an array.
5
Illustrate different storage class with an example. 5
8 What is function? Write a function to find the sum of two numbers 5
9 Define a function. List and explain the categories of user defined
functions 10
10 What is function? Explain the type of functions based on parameters
10
a. Develop a C program to read and display n random numbers using arrays. 5
11 b. Define nested loops. Develop a program in C to display a pyramid of stars 5
pattern using nested loops.
13 What are actual parameters and formal parameters? Illustrate with example 10
Illustrate function declaration, function definition, and function call with
10
14 syntax and examples
15 Write a C program to find the factorial of a number using functions
5
16 Give the scope and life time of the following
(i)External variable (ii) Static variable (iii) Automatic variable 10
(iv) Register variable
17 What is Recursion? Write a C program to compute polynomial co-efficient
8
nCr using recursion
a) Develop a C program to calculate GCD of a number using a
18 function 5
b) Develop a C program to print the Fibonacci series using recursion. 5
Module : II Operators, Decision Control & Looping
Sl. Questions Marks & Year
No
1. List all conditional control statements used in C. Explain any two with 6 Marks, Jan 17,
syntax and example
2. Write a C program that reads from the user an arithmetic operator and 6 Marks,Jan 17
two operands, perform the corresponding arithmetic operation on the
operands using switch statement
3. What are unconditional control statements? Explain any two with syntax Jan 17,
and example
4. Write a C program to find the biggest of three numbers 6 Marks, Jun 16
5. Explain switch statement with syntax and example 8 Marks, Jun 16
6. What is two way selection statements? Explain if, if else, and cascaded if- 8 Marks,Jan 16
else with examples.
7. Write a C program that takes from user an arithmetic operator („+‟, „-„, 8 Marks Jan 16
„*‟, or
„/‟) and two operands . Perform corresponding arithmetic operation
on the operands using switch statement
8 Explain with syntax ,if, if-else and nested if-else statements in „C‟ 9 Marks, Dec 16
program
9 Write a C program that takes three coefficients (a,b,and c) of a 10 Marks, Dec 14
quadratic equation ; (ax2+bx+c) as input and compute all possible
roots and print them with appropriate messages.
10 Show how break and continue statements are used in a C program, with 4 Marks, Dec 14
example
11 Write a calculator program in C language to do simple operations like 8 Marks,
addition, subtraction, multiplication and division. Use switch statement ModelQP
in your
program

You might also like