Course Code:
23E05101T
R2
3
CHAITANYA BHARATHI INSTITUTE OF TECHNOLOGY
(Autonomous)
(Approved by AICTE, New Delhi & Affiliated to JNTUA, Ananthapuramu)
(Accredited by NAAC with “A” Grade and Accredited by NBA (CE, EEE, ECE, CSE))
(Recognized by UGC under section 2(f) and 12(b) of UGC Act, 1956)
VIDYA NAGAR, PALLAVOLU (V), PRODDATUR-516360, Y.S.R. (Dt.), A.P
INTRODUCTION TO PROGRAMMING
QUESTION BANK
UNIT-I
1 Explain the basic organization of a computer, focusing on the [L2,CO 10
roles of the Arithmetic Logic Unit (ALU), memory, input-output 1] M
units, and the
program counter
2 a) Define algorithm. Explain the characteristics of an algorithm [L1,CO 5M
1]
b) Design an algorithm for finding average of three number [L3,CO 5M
1]
3 a) Define a flow chart. List the different symbols in flowchart. [L1,CO 5M
1]
b) Explain the flow chart symbols with example. [L2,CO 5M
1]
4 a) Define a pseudo code and explain with an example. [L1,CO 5M
1]
b) Explain how to compile and execution of a program with neat [L2,CO 5M
diagram. 1]
5 a) What is meant by data type. List the different data types with [L1,CO 5M
their sizes. 1]
b) Define a variable. Write the variable declaration. What are the [L1,CO 5M
rules for 1]
declaring a variable?
6 Define constant. List and explain the different constants in C [L1,CO 10
language. 1] M
7 List and explain the Various operators with example. [L2,CO 10
1] M
8 a) What is meant by type conversion? Explain the [L2,CO 5M
different types 1]
Course Code:
23E05101T
R2
UNIT-II 3
1 a) List the different decision statements available in C [L1, 5M
CO2]
b) Discuss each decision statement with suitable example [L2, 5M
CO2]
2 Write the syntax and illustrate the following statements with [L3, 10
example i) if Statement ii) if else Statement iii) else if ladder CO2] M
iv) Nested if
statements v) Switch Case
3 a) Develop a C Program to find whether the given number is even [L6, 5M
or odd CO2]
b) Create a C Program to find greatest of three numbers using [L6, 5M
nested if CO2]
else statement
4 a) Write a C Program to reverse a given number. [L6, 5M
CO2]
b) Apply switch case statement to write a C program that [L3, 5M
performs CO2]
arithmetic operations
5 a) Discuss the different looping statements with syntax in C [L3, 5M
CO2]
b) Explain the For Loop with syntax and example. [L2, 5M
CO2]
6 a) Differentiate While and Do-while loop with example. [L4 , 5M
CO2]
b) Construct a C Program to Perform Fibonacci series using for [L6, 5M
loop CO2]
7 a) Explain a nested for loop with syntax. [L2, 5M
CO2]
b) Compose a c program to print following series. [L6, 5M
* CO2]
**
***
****
8 a) Describe the below looping statements with example [L2, 5M
i. While Loop ii. Do-while loop iii. For loop CO2]
b) Discuss about break and continues statements in C. [L3, 5M
CO2]
9 a) Compose a C program to print following series [L6, 5M
1 CO2]
22
333
4444
b) Compose a C program to print following series [L6, 5M
**** CO2]
***
**
*
10 i What is meant by control statement? [L1, 2M
Course Code:
23E05101T
R2
) CO2]3
ii) State the syntax for nested if else statement. [L1, 2M
CO2]
iii) Compare while and do-while statement. [L4, 2M
CO2]
iv) Describe the syntax of for Loop. [L2, 2M
CO2]
v) Summarize break and continue keyword. [L2, 2M
CO2]
Course Code:
23E05101T
R2
UNIT-
3
III
1 a) Define an Array. Write the syntax for declaring and [L1, 5
initializing array with example. CO2] M
b) Describe the array subscript in C with example [L2, 5
CO2] M
2 a) List the different types of arrays. [L1, 5
CO2] M
b) Explain the One-Dimensional array with example. [L2, 5
CO2] M
3 a) Explain the Two-Dimensional array with example [L2, 5
CO2] M
b) Compose a C program for Transpose of a given matrix [L6, 5
CO2] M
4 a) Develop a C program to display array of elements in given [L3, 5
and reverse order. CO2] M
b) Compose a C program to find the sum of diagonal [L6, 5
elements in an CO2] M
array
5 a) Create a C program to perform the addition of two matrices. [L6, 5
CO2] M
b) Compose a C program to calculate sum of an array elements. [L6, 5
CO2] M
6 a) Create a C program to count the vowels, consonants, [L6, 5
special symbols and space in a given string. CO3] M
b) Create a C program to perform the following string library [L6, 5
function strlen(), strcpy(), strcat(), strcmp(). CO3] M
7 a) List and discuss the different string handling functions. [L2, 5
CO3] M
b) Apply string handling functions in C program. [L3, 5
CO3] M
8 a) Illustrate a C program to find reverse of a given string [L2, 5
without using string handling functions. CO3] M
b) Summarize the following [L3, 5
i) strcat ii) strcmp iii) strrev iv) strcpy CO3] M
9 a) Differentiate Character and String with example. [L4, 5
CO3] M
b) Develop a C program that implement strlen(), strlwr() and [L3, 5
strupr(). CO3] M
10 i Define 1D array. [L1, 2
) CO3] M
ii) Recall 2D array. [L1, 2
CO3] M
iii) Explain how to initialize the 1D array. [L2, 2
Course Code:
23E05101T
R2
3M
CO3]
iv) Define String. [L1, 2
CO3] M
v) List the different string handling functions [L1, 2
CO3] M
Course Code:
23E05101T
R2
3
UNIT-
IV
1 a) Define pointer. Write the syntax for declaring pointer with [L1, 5M
example. CO4]
b) Describe about pointers and arrays [L2, 5M
CO4]
2 a) Explain the concept of array of pointers with examples [L2,CO4 5M
]
b) What are the features of pointers? Write a C program to [L1,CO4 5M
print address of a variable ]
3 a) Explain the concept of pointer to pointers with examples [L2,CO4 5M
]
b) Discuss the concept of void pointers with examples. [L2,CO4 5M
]
4 a) List and describe about dynamic memory management [L1,CO4 5M
functions in C ]
b) Summarize the following with example [L2,CO4 5M
i. malloc(), ii. calloc(), iii. realloc() and iv. free() ]
5 a) How can pointer works on strings? [L2,CO4 5M
]
b) Examine the access to address of the pointer with example? [L3,CO4 5M
]
6 a) Define structure and give the general syntax for structure [L1,CO6 5M
with suitable example program. ]
b) Illustrate the procedure to declare and initialize a structure [L2,CO6 5M
with an example C program ]
7 a) Define structure within a structure? Explain with an example. [L2,CO6 5M
]
b) Describe about array of structures [L2,CO6 5M
]
8 a) Apply and explain the concept of pointers to structure in a C [L3,CO6 5M
program ]
b) Explain about nested structures [L2,CO6 5M
]
9 a) Illustrate the use of type def with suitable example. [L2,CO4 5M
]
b) Explain about Enumerated data type. [L2,CO4 5M
]
10 i What is pointer? [L1,CO4 2M
) ]
ii) Explain how to assign an address to pointer variable. [L2,CO4 2M
]
iii) Define void pointer. [L1,CO4 2M
]
iv) What is meant by structure and write the syntax for structure [L1,CO6 2M
declaration.
Course Code:
23E05101T
R2
] 3
v) Differentiate structure and union. [L4,CO6 2M
]
Course Code:
23E05101T
R2
3
UNIT-V
1 a) Define function. Explain the types of functions with an [L2, 5M
example CO5]
b) Develop a C program to swap two numbers using functions [L6, 5M
CO5]
2 a) Explain the library functions available in C? [L2, 5M
CO5]
b) Discuss in detail how communication is established among [L2, 5M
functions CO5]
in C language?
3 a) Distinguish between call by value and call by reference with [L4, 5M
an CO5]
example programs
b) How to use Array as Function argument? Explain with an [L1, 5M
example CO5]
program.
4 a) Create a c program for addition of two numbers using [L6, 5M
function CO5]
b) Describe about scope and distinguish between local and [L4, 5M
global CO5]
variable
5 a) Discuss - how to modify parameters inside functions using [L2, 5M
pointers. CO5]
b) Compose a C program to swap two numbers using call by [L6, 5M
reference. CO5]
6 Define File. Explain different file operations with examples [L2, 10
CO6] M
7 a) List the different file operations in C with their definition and [L1, 5M
syntax CO6]
b) Explain read () and write () operation with examples. [L2, 5M
CO6]
8 Summarize the following with examples. [L2, 10
i) Read() ii) write() iii)append() CO6] M
9 Illustrate a C program to append the Content of file at the end [L2, 10
of CO6] M
another file
10 i What is meant by function and list the different types of [L1, 2M
) function. CO5]
ii) What is meant by call-by-value? [L1, 2M
CO5]
iii) Define Call-by-reference. [L1, 2M
CO5]
iv) Define file. [L1, 2M
CO6]
v) List the different file operations in C. [L1, 2M
CO6]