CS3251 Question Bank
CS3251 Question Bank
SUBJECT : Programming in C
SEM / YEAR : Second Semester
PART - A
Q.No Questions BT Level Competence
1. Define programming paradigm. BTL -1 Remember
2. Give two examples for assignment statements. BTL -1 Remember
3. Distinguish between character and string. BTL -2 Understand
4. What are keywords? Give an example. BTL -1 Remember
5. What do you mean by variables in ‘C’? BTL -1 Remember
6. Identify the use of ternary or conditional operator. BTL -4 Analyze
7. What is mean by Operators precedence and
BTL -2 Understand
associative?
8. What is a compilation process? BTL -1 Remember
9. How to create enumeration constants ? BTL -4 Analyze
10. Differentiate between an expression and a
BTL -4 Analyze
statement in C.
ttps
11. What is the output of the programs given below? #include
<stdio.h>
main()
{
int a = 20, b = 10, c = 15, d = 5;
int e; BTL -3 Apply
e = (a + b) * c / d;
printf("Value of (a + b) * c / d is : %d\n", e );
}
ttps
14. Discover the meaning of C pre-processor. BTL -3 Apply
15. Invent the difference between ++a and a++. BTL -6 Create
16. Differentiate switch( ) and nested-if statement. BTL -2 Understand
17. Summarize the various types of C operators. BTL -5 Evaluate
18. Recommend the suitable example for infinite loop
BTL -5 Evaluate
using while.
19. What is a global variable? BTL -1 Remember
20. Differentiate break and continue statement. BTL -2 Understand
PART - B.
1. Describe the structure of a C program with an example.
(16) BTL -1 Remember
0
12. Write a C program for the following : BTL -4 Analyze
a. To find the sum of the digits of a number.
(123 => 1+2+3=6.(5)
b. To find the sum of all odd / even numbers
between 1 and 100.(5)
c. To check whether a number is prime or not.(6)
13. Write a C program for the following : BTL -1 Remember
a. To check whether a given number is a
palindrome (232) or not. (8)
0
UNIT II - ARRAYS AND STRINGS
17. Write the output of the following Code:
Introduction to Arrays: Declaration, Initialization – One dimensional array – Example
main()
Program: Computing Mean, Median and Mode - Two dimensional arrays – Example Program:
{
Matrix Operations (Addition, Scaling, Determinant and Transpose) - String operations: length,
compare, concatenate, copy – Selection sort, linear and binary search. BTL -5 Evaluate
char x; x = ‘a’;
PART - A
printf(“%d \n”,x);
Q.No Questions BT Level Competence
1. } out the features of Arrays.
List BTL -1 Remember
18. Specify any two methods of sorting. BTL -5 Evaluate
2. Define a float array of size 5 and assign 5 values to it. BTL -1 Remember
19. List out the any four functions that are performed on character
Identify BTL -1 Rememb
3. strings. the main elements of an array declaration. BTL -4 Analyze
er
4.
20. What
Write are
the the drawbacks
output of Initialization
of the following Code: of arrays in C? BTL -1 Remember
main()
5. What will happen when you access the array more than its
dimension?{ BTL -1 Remember
static char name[]=”KagzWrxAd”
6. Point out an example code to express two dimensional array.
int i=0; BTL -4 Analyze
while(name[i]!=’\0’)
How to create a two dimensional array? BTL -2 Understa
7. BTL -2 Understand
nd
{
8. What is the starting index of an array? BTL -3 Apply
printf(“%c”,name[i]); i++;
9. Distinguish} between
} one dimensional and two dimensional
arrays. BTL -4 Analyze
10. What are the different ways of initializing array? BTL -2 Understand
PART -B
11.
1. What is the the
(i) Explain useneed
of ‘\0’
forand ‘%s’?
array variables. Describe the BTL -1 Remember
following with respect
used intoscanf()
arrays:-statement to read an array?
12. Is address operator
Why? Declaration of array and accessing an array element. (8) BTL
BTL-6 -1 Create
Rememb
(ii) Write a C program to re-order a one-dimensional array of er
13. What is the role of strrev()? BTL -3 Apply
numbers in descending order. (8)
14.
2. Discover
Write a Cthe meaning
program to of a String.
perform the following matrix operations: BTL -3 Apply
(i) Addition (5) (ii) subtraction (5)
15. How to initialize
(iii) a string?(6)
Scaling Give an example. BTL
BTL -6 -4 Analyze
Create
16. Differentiate between Linear search and Binary search. BTL -2 Understand
3. .Write a C program to calculate mean and median for an BTL -5 Evaluate
array of elements.(8+8)
4. Write a C program for Determinant and transpose of a BTL -4 Analyze
matrix.(8+8)
5. Describe the following with suitable examples. (8+8)
(i) Initializing a 2 Dimensional Array(ii) Memory Map of a BTL -2 Understa
Dimensional Array. nd
6. Explain about the String Arrays and its manipulation in detail
(16) BTL -1 Rememb
er
7. .(i). Write a C program to find average marks obtained by a of 30
students in a test.(10) BTL -3 Apply
(ii).Write short notes on Reading and Writing string. (6)
8. Write a C program to sort the n numbers using selection sort
BTL -2 Understa
(16)
nd
9. Develop a C program to search an element from the array.
BTL -6 Create
(16)
10. Describe the following functions with examples. (4+4+4+4)
(i) strlen() (ii) strcpy() (iii)strcat() (iv)strcmp()
BTL -1 Remember
PART - A
Q.No Questions BT Level Competence
1. Define pointer. How will you declare it?
BTL -1 Remember
2. What is a pointer to a pointer?
BTL -1 Remember
3. Express the operations that can be performed on pointers.
BTL -2 Understand
4. What is pointer arithmetic?
BTL -1 Remember
5. What is a void pointer and a null pointer?
BTL -1 Remember
6. Differentiate between address operator and indirection
BTL -4 Analyze
operator?
7. Why is pointer arithmetic not applicable on void pointers?
BTL -2 Understand
8. Identify the use of Pointer.
BTL -1 Remember
9. Point out the meaning of user‐defined function.
BTL -4 Analyze
10. What is meant by library function?
BTL -4 Analyze
11. Write the syntax for function declaration
BTL -3 Apply
12. Compose the two parts of function definition.
BTL -6 Create
13. What is meant by pass by value and pass by reference?
BTL -3 Apply
14. What is a function call? Give an example of a function call.
BTL -3 Apply
15. Invent the meaning of default arguments and command line
BTL -6 Create
arguments.
16. What is a recursive function?
BTL -2 Understand
.
17. Specify the need for function.
BTL -5 Evaluate
18. Assess the meaning of function pointer.
BTL -5 Evaluate
19. What is array of pointer?
BTL -1 Remember
20. Mention the advantage of pass by reference.
BTL -2 Understand
PART – B
www.AUNewsBlog.net
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
UNIT-IV-STRUCTURES
SYLLABUS
Structure ‐ Nested structures – Pointer and Structures – Array of structures – Example Program
usingstructures and pointers – Self referential structures – Dynamic memory allocation ‐ Singly
linked list ‐typedef
PART – A
Q.No Questions BT Level Competence
15. Identify the difference between Append and Write Mode. BTL ‐1 Remember
16. What is the use of rewind() functions. BTL ‐2 Understand
17. Write a C Program to find the Size of a File. BTL ‐5 Evaluate
18. Write the Steps for Processing a File BTL ‐5 Evaluate
19. Write a code in C to defining and opening a File. BTL ‐6 Create
PART – B
1. Describe the following file manipulation functions with
examples.(16)
a) rename().(2)
b) freopen().(4) BTL -1 Remember
c) remove().(2)
d) tmpfile(void).(4)
e) fflush().(4)
2. Distinguish between the following functions.(16)
a) getc() and getchar().(4)
b) scanf() and fscanf().(4) BTL -2 Understand
c) printf() and fprintf().(4)
d) feof() and ferror().(4)