Module Wise Question Bank CPS
Module Wise Question Bank CPS
Module Wise Question Bank CPS
22 Write a program in C to print the numbers from 4 to 9 and their squares 4 Marks, ModelQp
23 Write a C program in C to find the area and perimeter of a rectangle 6 Marks, Jan 15
24 Write a C program which takes as input p,t,r. Compute the simple interest and 6 Marks, Jan 16
display the result
25 Write a C program to find the area of triangle when we know the lengths of all 5 Marks, ModelQp
three of its sides
26 Write a C program to find the largest of three numbers using ternary operator 5 marks, Jun 16
27 What is an expression? Evaluate the following expressions 4 marks, Jan 16
i) 100 % 20 < = 20 – 5 + 100 % 10 – 20 = = 5 > = 1 != 20
ii) a + = b * = C - = 5 where a=3 b=5 and c=8
28 Convert the following mathematical expression into C equivalent 4 Marks Jan 17
i) area= s(s-a)(s-b)(s-c)
ii) x = -b + b2-4ac
Module : II Branching & Looping
Sl. Questions Marks & Year
No
1. List all conditional control statements used in C. Explain any two with syntax 6 Marks, Jan 17,
and example
2. Write a C program that reads from the user an arithmetic operator and two 6 Marks,Jan 17
operands, perform the corresponding arithmetic operation on the operands
using switch statement
3. Implement a C program to find the reverse of an integer number and check 8 Marks,Jun 16,
whether it is palindrome or not Jan 17,
4. What are unconditional control statements? Explain any two with syntax and Jan 17,
example
5. Write a C program to find the biggest of three numbers 6 Marks, Jun 16
6. Explain switch statement with syntax and example 8 Marks, Jun 16
7. List the differences between while loop and do-while loop. write a C program 8 Marks, Jun 16
to find sum of Natura numbers from 1 to N using for loop
8. Write a C program to find the factorial of a number using do-while ,where the 8 Marks,Jun 16
number n is entered by user.
9. What is two way selection statements? Explain if, if else, and cascaded if-else 8 Marks,Jan 16
with examples.
10. Write a C program that takes from user an arithmetic operator („+‟, „-„, „*‟, or 8 Marks Jan 16
„/‟) and two operands . Perform corresponding arithmetic operation on the
operands using switch statement
11. Explain with example ,the meaning of statement and block in a „C‟ program 5 Marks, Dec 16
12. Write a „C‟ program to demonstrate the use of unconditional goto statement 6 Marks, Dec 16
13. Explain with syntax ,if, if-else and nested if-else statements in „C‟ program 9 Marks, Dec 16
14. Explain with syntax , the different loops used in „C‟ program 9 Marks, Dec 16
15. Write a program in „C‟ to find the sum of „n‟ natural numbers without using 6 Marks ,Dec 16
any loops
16. Write a C program that takes three coefficients (a,b,and c) of a quadtatic 10 Marks, Dec 14
equation ; (ax2+bx+c) as input and compute all possible roots and print them
with appropriate messages.
17. Show how break and continue statements are used in a C program, with 4 Marks, Dec 14
example
18. Explain with examples formatted input output statements in C 6 Marks, Jun 15
19. Write a C program to find GCD of two numbers using ternary operator and for 8 Marks, Model
loop QP
20. Write a calculator program in C language to do simple operations like 8 Marks, Model
addition, subtraction, multiplication and division. Use switch statement in your QP
program
21. What is dangling else problem? Explain how to handle tis in C programming 6 Marks, Jun 16
Module : III Array and Strings
Sl. Questions Marks & Year
No
1 What is array ? Explain the declaration and initialization of one dimensional 10Marks Jan 2019
and two dimensional array with an example 6 Marks,Jan-2017,
Jan-2016,Model
QP
Define array.Explain with suitable example how to declare and initialize 1D 10 Marks Jun
array 2019
2 Write a C program to read N integers into an array A and to find the 6 Marks
(i)sum of odd numbers,(ii) sum of even numbers,(iii) average of all numbers. Jun 2015,
Output the results computed with appropriate headings
3 Write a C program to search an element using linear and binary techniques 10 Marks Jun
2019
Write a C program for [consider integer data] 10Marks Jan 2019
(i) Bubble sort (ii) Linear search
Write a C program to read N numbers into an array & perform Linear search 8M ,VTU
ModelQP
Write an algorithm and develop a C program that reads N integer numbers and 8M ,VTU
arrange them in ascending order using selection Sort ModelQP
Write an algorithm and develop a C program to search an integer from N 8M ,VTU
numbers in ascending order using binary searching technique ModelQP
4 Write a C program to find the transpose of a given matrix 10Marks Jan 2019
5 Write a C program that accepts (3×3 ordered matrices A and B),and compute 8 Marks ,ModelQp
the following (i)summation of Two numbers (ii) Subtraction of Two numbers
6 Write a C program to find the sum and average of n integer numbers 5 Marks,ModelQp
7 Write a C program to find the largest element in an array 6M, VTU Model
Qp
Write a C program to find the greatest number from two dimensional array 6 Marks ,Model
Qp
8 Write a C program to sort the elements by passing array as function argument 8 Marks,Jan 2016
9 Define string. How string is declared and initialized ? Explain string 6M ,VTU
input/output functions with an example ModelQP
10 What is string ? Write a C program that reads a sentence and prints the 6 Marks,
frequency of each of the vowels and total count of consonants? Jan 2017
11 Write a C program to eliminate multiple spaces from a sentence and make it 10
single Marks,ModelQp
12 Explain with syntax and example ,the different string manipulation library 5 or 10 Marks,
functions with example Jan 2017,
ModelQp
Define a string. Explain any 4 string library functions with syntax and 10 Marks Jun
example 2019
Explain string manipulation library functions with their syntaxes 6M, VTU Model
Qp
13 Define string. List out all string manipulation function. Explain any two with 10Marks Jan 2019
example
14 Write a C Program to implement string copy operation STRCOPY(str1,str2) 6 Mrks,
that copies string str1 to another string str2 without using library function Jan 2017
Write a C program to copy a string ( combination of digits and alphabet ) to 10 Marks Jun
another string (only alphabets) 2019
15 Write a program to replace each constant in a string with the text one except 6 Marks ,
letter „z‟ „Z‟ and „a‟ „A‟ . Thus the string “Programming in C is fun” should be Jan 2016
modified as “Qsphsannjoh jo D jt gvo”.
16 Write a C program to concatenate two strings without using built-in function 8 MarksJan2016
strcat() 6M,VTU Model
Qp
17 Explain with example (i) Character string (ii) String literal (iii) storage classes 6 Marks,Jan 2017
18 How string is declared and initialized? Explain any four string manipulation 8 Marks
functions with examples Jun 2015
19 Write a C program to check whether the given string is palindrome or not 8M, VTU Model
without using in built function Qp
20 Write a C program to search a name in a given list using binary search 10 Marks,Jun 2016
technique
Module IV : Functions & Recursion
1 What is function ? Explain the difference between user defined and library 6M, VTU Model
functions QP
2 Explain the different elements of user defined functions in detail 8M, VTU Model
QP
Explain function call, function definition and function prototype with 6 Marks, Jun 2015
examples
3 What is function? Write a function to find the sum of two numbers 6 Marks ,Jan 2015
4 Explain two categories/types of argument passing techniques, with examples 6 Marks ,Jan 2015
Differentiate between call by value and call by reference with examples 6M,VTU
ModelQP
5 Explain the classification of user defined functions
Define a function. List and explain the categories of user defined functions 10 Marks Jun
2019
What is function? Explain the type of functions based on parameters 10Marks Jan 2019
6 Marks,Jan 2017
What is function? Explain different classification of user defined functions 12M,VTU
based on parameter passing and return type with examples ModelQP
6 Write a C function isprime(num) that accepts an integer argument and returns 8 Marks ,Jan 2015
1 if the argument is a prime or 0 otherwise. Write a program that invokes this
function to generate prime numbers between the given ranges
Write a c-program using function to check whether the given number is prime 4 M,VTU
or not. ModelQP
7 Write a program in „C‟ using functions to swap two numbers 8 Marks, Jan 2017,
Write a program in C using functions to swap two numbers using global 6M,VTU
variables concept and call by reference concept. ModelQP
8 What are actual parameters and formal parameters? Illustrate with example 6 Marks, Jun 2015
9 Write a C program to find the factorial of a number using functions 10Marks Jan 2019
10 Write a program to find GCD and LCM of two numbers using concept of 10Marks Jan 2019
functions
11 Give the scope and life time of the following 10Marks Jan 2019
(i)External variable (ii) Static variable (iii) Automatic variable (iv) Register
variable
12 What are the three possibilities of defining a user defined functions in „C‟? 6 Marks, Jan 2017
13 What is Recursion? Write a C program to compute polynomial co-efficient 4 marks,Jan 2017
nCr using recursion
Write a C program for evaluating the binomial coefficients using a function 10 Marks Jun
factorial(n) 2019
Write a C program to find the binomial co-efficient a number using recursion 8M,VTU
ModelQP
14 Define a recursion . Write a C recursive function for multiplying two integers 10 Marks Jun
where a function call is passed with two integers m and n 2019
15 Write a C program to check a number is a prime or not using recursion 5 Marks, Jan 2016
16 Write a C program to find the factorial of a number using recursion 5 Marks, Model
Qp
17 Explain recursion. and write a program to find nth term of Fibonacci series 10Marks Jan 2019
6M, VTU
Write a C program to calculate the Fibonacci sequence using recursion ModelQP
functions
Write a c-program using functions to generate the Fibonacci series. 8M, VTU
ModelQP
18 What is recursion? Explain. Write a c-program using recursive function for 10M,VTU
Binary to Decimal Conversion. ModelQP