Programming in C Question Bank
Programming in C Question Bank
Q20 With the help of an example show the working of bitwise operator. CO2
Level B. Intermediate Questions (5 marks each)
Q21 What are the storage classes in ‘c’? Mention the types and explain with examples. CO2
Q22 Describe the precedence and order of evaluation of operations of different CO2
operators.
Q23 Differentiate between intrinsic and extrinsic type casting. CO2
Q24 Write an algorithm/program to check whether the entered number is even or CO2
not.
Q25 Discuss about the various types of statements in ‘c’. Explain with example. CO2
Q29 With help of an example explain the working of logical operator. CO2
Q30 Write an algorithm/ C program in C to find the area and perimeter of a rectangle CO2
Q32 Type casting is an important part when doing the operations on numeric values. CO2
Justify your answer with suitable example.
Q33 Write a program in ‘C’ to enter the basic salary of the employee, calculate DA at CO2
15 %, TA at 25 %, HRA at 25 %,then calculate pay given to the employee.
Q34 Write a program in ‘C’ to take two numbers as input and print the sum, CO2
difference, division, multiply of these numbers.
Q35 Accept the marks in five subjects and marks obtained and percentage of marks. CO2
Q12 Elaborate the every element included in the for loop. CO2
Q13 Explain the use of continue statement with the help of examples. CO2
Q22 Write a program to find the sum of even and odd numbers from 1 to n. CO2
Q23 Explain else-if ladder with the help of flowchart and program. CO2
Q24 Write a program to find sum of the individual digits of a given number. CO2
Q27 Write a C program to find the factorial of a number using do-while ,where the CO2
number n is entered by user.
Q28 Write a program to check whether the given number is palindrome or not. CO2
Q29 What is switch case? Discuss the restrictions on the switch case? CO2
Q30 Develop a C program to accept a number n and print sum of all even digits and CO2
multiplication of odd digits.
Level C. Difficult Questions (10 markseach)
Q31 Explain various branching statements in C with examples. CO2
Q34 Compare the use of the switch statement with the use of nested if-else. CO2
Q5 How to declare and initialize 1-D, 2-D array with an example. CO3
Q6 Write a C program to find the largest element given in an array of elements. CO3
Q13 Develop a C function which return the length of the string, without using string CO3
library functions.
Q14 Write a C program to print the smallest value in a given array along with its CO3
position in the array.
Q15 What are the built-in and user-defined functions? CO3
Q23 Write a C program to sort the given array elements in Ascending order. CO3
Q24 How to declare and initialize a Two-dimensional array? Discuss with examples. CO3
Q27 Show the use of strcpy() and strcat() using an example. CO3
Q29 Using a suitable example differentiate between printf() and puts(). CO3
Q32 Show the steps to search 38 among the given set of elements using binary search CO3
method:
12, 35, 8, 18, 38, 41, 19
Q33 Write a C program to multiply two matrices of different order. CO3
Q34 Explain the concept of recursion. Create a recursive function which return the CO3
factorial of a given number.
Q35 Using 2-D array, write a program to print the Pascal triangle. CO3
Q36 Using C language, write a program to generate the following output: CO3
Input : 2345
Output: Two Three Four Five
** Note: Students to be instructed to draw well labeled diagrams
wherever necessary, to support their answers (especially in level B
and C questions)
Question Bank - Unit no.: IV
Program: BCA
Course Name: Introduction to Programming Course Code: 21BCA102
Academic year: 2022-23 Sem/Year: I / 1
Level A. Easy Questions (2 marks each)
S. Questions
CO*
No.
Q1 Differentiate between the structure and union? Give examples. CO4
Q2 How the calloc() and malloc functions are used? Write a program using them CO4
Q5 With the help of an example, show the passing of a pointer variable as argument. CO4
Q11 Discuss the advantages of dynamic memory allocation over array. CO4
Q16 Write a program to print the address and string using array of pointers to strings. CO4
Q17 How a function can return more than one value? CO4
Q18 Write a program to swap two values without using third variable. CO4
Q24 Differentiate between static memory allocation & dynamic memory allocation. CO4
Q25 Discuss about the pointer arithmetic. What are the operations can be performed CO4
on pointer variables.
Q26 Discuss about the call by value and call by reference. CO4
Q27 Write a C program to show that pointer of any data type occupies same space. CO4
Q28 Define Structure and write the general syntax for declaring and accessing CO4
members.
Q29 How to copy and compare structure variables? Illustrate with example. CO4
Q30 How data elements are stored under unions, explain with example? CO4
Q13 What are two main ways a file can be organized? CO5
Q25 Write a program to read and write a block onto a file. CO2,CO5