0% found this document useful (0 votes)
3 views12 pages

Prog in C QB - Final

The document is a question bank for the course 'Programming in C' for the academic year 2024-2025. It includes questions categorized into four units covering basics of C programming, arrays and strings, functions and pointers, and structures and unions, with both part A and part B questions. Each question is tagged with its corresponding course outcome (CO) and Bloom's taxonomy level (BT).

Uploaded by

vishali.aids
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views12 pages

Prog in C QB - Final

The document is a question bank for the course 'Programming in C' for the academic year 2024-2025. It includes questions categorized into four units covering basics of C programming, arrays and strings, functions and pointers, and structures and unions, with both part A and part B questions. Each question is tagged with its corresponding course outcome (CO) and Bloom's taxonomy level (BT).

Uploaded by

vishali.aids
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Academic Year 2024 – 2025

Question Bank

Course Code / Name: 24CS201 PROGRAMMING IN C

Year / Sem / Sec: I / I / A,C,D,E,H,I,J

UNIT –1 BASICS OF C PROGRAMMING


PART – A
D.L
Q.No Questions CO BT
(E/M/D)

Define programming paradigm and mention any 2


1 CO1 U E
paradigms.

2 What are the features of C program? CO1 R E

3 List out some applications of C. CO1 R E

4 What are the different data types available in “C”? CO1 R E

5 Define Constants in C. Mention the types. CO1 U E

6 What is enumerated datatype in C? CO1 R E

7 What are Ternary operators or Conditional operators? CO1 R E

What are the Bitwise operators and logical operators R E


8 CO1
available in C ?

9 What is a Variable? Illustrate it with an example. CO1 R E

10 What are keywords? Give example. CO1 R E

11 What is type casting? CO1 R E

12 Summarize the various types of C operators. CO1 R E

What is the difference between while loop and do…while R


13 CO1 E
loop? (or) Differentiate Entry and Exit controlled constructs.

14 What is meant by operator precedence and its associativity? CO1 R E

15 Define integer and floating type of data in C with example. CO1 U E


16 Mention the types of I/O statements available in ‘C’. CO1 R E

17 What is the difference between ++a and a++? CO1 R E

18 Construct an infinite loop using while. CO1 R E

What is the output of the code given below?


#include
<stdio.h>
main()
{
int a = 20, b = 10, c = 15, d = 5; AP M
19 CO1
int e;
e = (a + b) * c / d;
printf("Value of (a + b) * c / d is : %d\n", e );
}

20 What are the Escape Sequences available in “C”? CO1 R E

Write the limitations of getchar( ) and scanf( ) functions for CO1 R E


21
reading strings

22 What is the difference between scanf() and gets() function? CO1 R E

23 Write a for-loop statement to print numbers from 10 to 1. CO1 R E

24 List some preprocessor directives in C CO1 R E

25 Give the rules for defining preprocessor. CO1 R E

26 What is the use of #define processor? CO1 R E

Differentiate between formatted and unformatted input CO1 AN E


27
statements. Give one example for each.

28 What is compilation process? CO1 R E

PART B

Q.N D.L *
Questions M CO* BT*
o (E/M/D)

1 Describe the structure of a C program with an example 16 CO1 U E

2 Illustrate about the various data types in ‘C’ 16 CO1 U E

3 What is purpose of Decision Control Statements in C? Explain 16 CO1 U E


any two of such types with the general form of simple
statements.

4 Discuss about the constants, expressions and statements in ‘C’ 16 CO1 U E

8 U
(i ) Explain the different types of operators used in ‘C’ with
5 necessary program. CO1 M

(ii) Write a C program to check the integer is Palindrome or not. 8 U

Explain about the various looping statements available in 'C' with 16 CO1
6 U E
appropriate sample programs.

Write a C program for the following: 8


AP
7 (i) To generate the first n number in a fibonacci series CO1 M
AP
(ii) To find the factorial of a given number 8

8 Explain in detail about input output statements with example. 16 CO1 U E

Write a C program for the following : 8

(i). To find the sum of the digits of a number. AP

9 123 => 1+2+3=6. CO1 M

(ii). To find the sum of all odd / even numbers 8 AP

between 1 and 100.

Write a c program to find largest among three numbers. 8

10 Write a c program to solve quadratic equation. 8 CO1 AP M

UNIT –2 ARRAYS AND STRINGS


PART – A

D.L
Q.No Questions CO BT
(E/M/D)

1. What is an array? Write the syntax for array. CO2 R E

2 List out the features of Arrays. CO2 R E

3 Define a float array of size 5 and assign 5 values to it. CO2 U E

4 How will you access an array element in C? CO2 U E

5 Give an example code to express two dimensional array. CO2 AP M

6 Write the syntax to declare a two-dimensional array. CO2 R E

7 Distinguish between one dimensional andtwo-dimensional CO2 AN M


arrays.
8 What is the use of strrev()? Give example. CO2 R E

9 What is meant by String? CO2 R E

10 Show a C function to compare two strings. CO2 AN M

Is address operator used in scanf() statement to read an CO2


11 R E
array? Why?

12 How to initialize a string? Give an example. CO2 U E

13 What are the different ways to initialize strings? CO2 R E

14 Define String Constant. CO2 R E

List out the any four functions that are performed on CO2
15 R E
character strings.

What will be the output of following program ?

#include <stdio.h>
int main()
16 { CO2 AP M
char str[8]="Programming";
printf("%s",str);
return 0;
}
Write the output of the following Code:
main()
{
17 char x; x = ‘a’; AP M
printf(“%d \n”,x); CO2
}

18 Define Sorting CO2 U E

19 Specify any two methods of sorting. CO2 R E

Write the output of the following Code

main()
{
static char name[]=”Programming”
inti=0;
20 while(name[i]!=’\0’) CO2 AP M
{
printf(“%c”,name[i]);
i++;
}}

21 CO2 R E
Define Searching.

PART – B

Q.N D.L *
Questions M CO* BT*
o (E/M/D)

1 Write a C program to perform matrix addition operations. 16 CO2 AP M

2 Explain about the string operations with suitable examples. 16 CO2 R M

Write an algorithm and implementation to sort an array of 16 M


3 CO2 AP
integers in ascending order using selection sort.

Write a program to implement binary search using an iterative 16


4 CO2 AP D
method.

What is an array? Explain about one dimensional array with a 16


5 CO2 U M
sample program.
6 Write a C program to perform matrix multiplication. 16 CO2 AP M

Write a C program to implement two dimensional array. 8 M


7 CO2 AP
Write a C program to calculate average marks using array. 8

8 Write a C program for transpose of a matrix. 16 CO2 AP M

Write a C program to find number of vowels, constants, digits 16


9 CO2 AP M
and white space in an string.

Write a c program to concatenate string. 8


10 CO2 AP M
Write a c program to find length of the string 8

UNIT 3 FUNCTIONS AND POINTERS

PART - A

D.L
Q.No Questions CO BT
(E/M/D)

1. Define function. How will you declare it? CO3 U E

2 What is the need for functions? CO3 R E

3 What is function prototype? CO3 R E

4 Mention the elements of user defined function. CO3 R E

5 What are the two ways to pass parameters to the function? CO3 R E

6 Categorize function prototype types based on arguments. CO3 U E

7 Distinguish call by value and call by reference. CO3 AN E

8 Write a C program to swap given 2 numbers. CO3 R E

9 Define Recursion. CO3 R E

10 List the advantages of recursion. CO3 U E

11 Define Pointer with its syntax. CO3 U E

12 How will you initialize pointer variable? CO3 R E


13 Write a program to find factorial of a given number. CO3 AP E

14 Mention the applications of pointer. CO3 R E

15 What is meant by built in function? List any 4 built in functions. CO3 R E

16 Define Null Pointer. CO3 U E

17 Write a C program to illustrate pointer. CO3 AP M

18 What are the two pointer operators? Define. CO3 R E

19 What is Pointer Arithmetic? CO3 R E

20 What do you mean by array of pointers? CO3 R E

21 What is the difference between an array and pointer? CO3 R E

PART B

D.L *
Q.No Questions M CO* BT*
(E/M/D)

Explain in detail about types of function prototype with suitable 16 CO


1 R E
program. 3

(i)Write a C program to find factorial using recursion 8 CO


2 AP M
(ii)Write a C program to find fibonacci 8 3

16 CO
3 R M
Explain in detail about function with its syntax and example. 3

Discuss in detail about pass by value, pass by reference with 16 CO


4 R M
suitable example. 3

16 CO M
5 AP
Write a C program to perform binary search using recursion. 3

Explain the use of pointers in handling array. 8 CO


6 R
Explain pointer arithmetic with example. 8 3 M

16 CO E
7 R
Discuss about pointers and pointer operators with example. 3

8 Explain in detail about built in string and math function. 16 CO R E


3

16 CO
9 R E
Explain in detail about recursion with example program. 3

Write a C program to add two numbers using integers and 8


function
10 M
CO
Write a C program to calculate GCD of two numbers using AP
8 3
recursion.

What is modular programming? How does the C language 16 CO E


11 R
support the modular programming? Explain in detail. 3

UNIT –4 STRUCTURES AND UNION

PART – A

D.L
Q.No Questions CO BT
(E/M/D)

1. Define Structure in C. CO4 U E

2 How will you define a structure? CO4 R E

3 Give syntax for structure definition. CO4 R E

4 Write the rules for declaring a structure? CO4 R E

5 How will you declare structure variables? CO4 R E

6 Write the three ways to pass structure variables. CO4 R E

7 How structure elements can be accessed? CO4 R E

8 List the features of structures. CO4 R E

9 Differentiate between array and structure. CO4 U E

10 Define nested structure. CO4 U E

11 Write the syntax of pointers to structures. CO4 R E

12 Specify the use of typedef with its syntax. CO4 U E

13 What is array of structures with an example. CO4 AP M

14 What are self-referential structures? CO4 R E


Define the Structure called ID_card to hold the details of the CO4 U
15 E
student.

16 Define Singly Linked list. CO4 U E

Define dynamic memory allocation functions and list its CO4 E


17 U
types.

18 What is the output of the following code fragment? CO4 R E

19 List the operations on singly linked list. CO4 R E

20 Write syntax of calloc() and relloc(). CO4 R E

21 What is meant by Union in C? CO4 R E

22 Define union in C. CO4 U E

23 How can you access the member of union? CO4 R E

24 What is meant by storage class? CO4 R E

25 List the storage class specifiers. CO4 R E

PART B

Q.N D.L *
Questions M CO* BT*
o (E/M/D)

1 Explain in detail about structure with suitable example 16 CO4 U M

2 Write a c program to illustrate nested structures 16 CO4 AP M

Write a c program using structures to prepare student mark


3 statement
16 CO4 AP M

i)Explain with an example about self referential structure.

4 ii) Describe in detail about Union with example. 16 CO4 AN M

Write a program to initialize the member of structure using 16 CO4


5 AP M
pointer to structure.
6 Discuss in detail about dynamic memory allocation. 16 CO4 R E
Write a c program to implement singly linked list using dynamic 16 CO4 M
7 memory allocation. AN

8 Explain in detail about insertion and deletion of node in linked list. 16 CO4 R E

Discuss in detail about types of storage classes with suitable 16 CO4


9 AN M
example program.

10 Write a C program to store Employee information using structure. 16 CO4 AP M

UNIT 5- FILE PROCESSING

PART A
D.L
Q.No Questions CO BT
(E/M/D)

1. What is a File? Mention its types CO4 R E

2 Write the syntax to open a file. CO4 R E

3 What are file attributes? CO4 R E

4 What are the statements used for reading a file? CO4 R E

5 List the types of file functions. CO4 R E

6 Mention the use of fseek() and ftell() function. CO4 R E

7 What is random access file? CO4 R E

8 List the different modes of opening a file. CO4 R E

9 What are command line arguments? CO4 R E

10 Define sequential access file. CO4 U E

11 What is the advantage of a random access file? CO4 R E

What does argv and argc indicate in command-line CO4


12 R E
argument?

13 Write the basic operations on files. CO4 R E

14 State the use of fflush() method. CO4 U E


15 Which methods are used to write in to binary files? CO4 R E

How do you search data in a data file using random access CO4 R E
16
method?

17 Write a C program to create a data file. CO4 R E

Write a program to copy contents of input.txt file to CO4 E


18 AN
output.txt file.

19 What is purpose of library functions feof()? CO4 R E

20 Compare Text file and Binary file. CO4 U E

21 Define File Pointer in C. CO4 U E

PART B

Q.N D.L *
Questions M CO* BT*
o (E/M/D)

1 Explain the type of file processing with its syntax and example. 16 CO4 R M

Write a C program for finding the average of numbers stored in 16 CO4


2 AP M
sequential access file.

Discuss the function used for accessing the file randomly? 16 CO4
3 U M
Explain with example.

Explain in detail about various operation on file with suitable 16 CO4


4 U M
example.

i)Describe in detail about Command line arguments with 8


example. U
5 8 CO4 M
ii)Write C program to Copy the contents form one file into AP
another file.

i)Write C program to find Number of lines in file.


6
ii)Write C program to reverse the contents in file. 16 CO4 AP M

Write a C program to read name of marks of N number of 16 CO4


7 AN M
students from the user and store them in file.

8 Write a C program to Open, Read, write and closing of file with 16 CO4 AN M
its syntax.

9 Write a C program to write data to text file and to read it. 16 CO4 AP M

i)Tabulate various file opening modes in C. 8 AP M


10
ii)Explain in detail about Input/Output functions on file. 8 CO4 R E

FACULTY HOD/IT HOD/S&H DEAN PRINCIPAL

You might also like