CS3251 Programming in C Important Q Bank
CS3251 Programming in C Important Q Bank
in/
CS 3251 Programming in C
Important Questions
SUBJECT : Programming in C
SEM / YEAR:Second Semester / 1st Year
SYLLABUS
Introduction to algorithm: Flowchart-Pseudo code- Introduction to programming
paradigms- C programming: Data Types -Keywords-Variables and Constants–
Operators and Expressions: Expressions -precedence,-associativity-Input/Output
statements-Decision making and looping: Branching statement ,Iterative statement -
in
Compilation process.
n.
PART - A
Q.No Questions BT Level Competence
aa
1. Define programming paradigm. BTL -1 Remember
2. Give the definition for flowchart and pseudo code. BTL -1 Remember
iy
BTL -1 Remember
6. Identify the use of ternary or conditional operator. BTL -4 Analyze
w
13. What is header file? why they are important? BTL -1 Remember
https://www.poriyaan.in/paper/programming-in-c-22/
www.poriyaan.in https://cse.poriyaan.in/
14. Show the difference between while and do-while. 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 using
while. BTL -5 Evaluate
PART - B.
1. Describe the structure of a C program with an
example.(13) BTL -1 Remember
in
in ‘C’. (13)
3. Illustrate about the various data types in ‘C’ and write a
n.
C program to find the sum of 10 non-negative numbers BTL -3 Apply
entered by the user.(13)
aa
4. (i) Explain the different types of operators used in ‘C’
with necessary program. (8)
BTL -2 Understand
iy
https://www.poriyaan.in/paper/programming-in-c-22/
www.poriyaan.in https://cse.poriyaan.in/
11. Develop a C program for the following :
(i). To find the area and circumference of a circle
with radius r.(6) BTL -6 Create
(ii). To find the sum of first 100 integers.(7)
12. Write a C program for the following :
(i). To find the sum of the digits of a number.
(123 => 1+2+3=6.(7) BTL -4 Analyze
(ii). To find the sum of all odd / even numbers
between 1 and 100.(6)
13. Write a C program for the following :
(i). To generate the first n numbers in a Fibonacci
series.(7) BTL -1 Remember
(ii). To find the factorial of a given number.(6)
14. Write a C program to generate Armstrong number
between 100 and 999.(13) BTL -4 Analyze
PART-C
Developa C program for the following :
in
(i) To check whether a number is prime or not.(8)
1. (ii). To convert the temperature given in Fahrenheit to BTL -6 Create
Celsius and vice versa.(7)
n.
aa
Compare and contrast branching and looping
2. statements.(15) BTL -5 Evaluate
iy
https://www.poriyaan.in/paper/programming-in-c-22/
www.poriyaan.in https://cse.poriyaan.in/
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
SYLLABUS
Introduction to Arrays: One dimensional array: Assigning an array to another array –Equating
an array with another array-Two dimensional Arrays: Declaration-usage of two dimensional
array-reading, storing and accessing elements in two dimensional array-memory
representation-String operations: String library functions- list of strings-command line
in
arguments. PART - A
n.
Q.No Questions BT Level Competence
1. List out the features of Arrays. BTL -1 Remember
aa
2. Define a float array of size 5 and assign 5 values to it.
BTL -1 Remember
iy
5. What will happen when you access the array more than
BTL -1 Remember
its dimension?
w
https://www.poriyaan.in/paper/programming-in-c-22/
www.poriyaan.in https://cse.poriyaan.in/
16. What will be the output of following program ?
#include <stdio.h>
int main()
{
BTL -2 Understand
char str[8]="IncludeHelp";
printf("%s",str);
return 0;
}
17. Write the output of the following Code:
main()
{
char x; x = ‘a’; BTL -5 Evaluate
printf(“%d \n”,x);
}
in
20. Write the output of the following Code:
main()
n.
{
static char name[]=”KagzWrxAd”
aa
inti=0;
while(name[i]!=’\0’) BTL -2 Understand
iy
{
printf(“%c”,name[i]);
or
i++;
} }
.p
PART -B
w
https://www.poriyaan.in/paper/programming-in-c-22/
www.poriyaan.in https://cse.poriyaan.in/
5. Describe the following with suitable examples. (6+7)
(i) Initializing a 2 Dimensional Array
(ii) Memory Map of a Dimensional Array. BTL -2 Understand
in
12. (i)What are the different types of string function?
n.
Describe with their purpose.(5)
(ii)Write the C program to find the number of Vowels, BTL -2 Understand
aa
Constants, Digits and white space in a string. (8)
iy
PART-C
w
of 30 students in a test.(15)
Write a C program to perform the following matrix BTL -6 Create
2. operations: (i)Addition(4) (ii) subtraction (4)
(iii)multiplication (7)
3. Write a C program to simulate strcpy function.(15) BTL -5 Evaluate
Compare and contrast gets() and puts().(15)
4. BTL -5 Evaluate
https://www.poriyaan.in/paper/programming-in-c-22/
www.poriyaan.in https://cse.poriyaan.in/
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
UNIT III-FUNCTIONS
SYLLABUS
Introduction to functions: Classification of functions- function definition-function call-
function with inputs and outputs-recursive function-library functions-scope of variables.
PART - A
Q.No Questions BT Level Competence
1. Define function. How will you declare it?
in
BTL -1 Remember
2. What are the various parts of functions?
n.
BTL -1 Remember
3. Express the difference between function declaration and
aa
function definition. BTL -2 Understand
14. Invent the meaning of block scope in scope of variables. BTL -6 Create
15. What is a recursive function? BTL -2 Understand
16. Specify the need for function. BTL -5 Evaluate
17. Assess the meaning of function. BTL -5 Evaluate
18. What is no argument and no return value in a function? BTL -1 Remember
19. Narrate how to apply user-defined function. BTL -3 Apply
https://www.poriyaan.in/paper/programming-in-c-22/
www.poriyaan.in https://cse.poriyaan.in/
20. Mention the advantage of pass by reference. BTL -2 Understand
PART – B
1. Describe about functions and their operations that can be Remember
BTL -1
performed on it.(13)
2. What are the different types of functions? Explain in
BTL -4 Analyze
detail with example(13)
3. Demonstrateabout function declaration and function BTL -3 Apply
definition. (13)
4. Discuss about the classification of functions depending BTL -2 Understand
upon their inputs and output (parameters) (13)
in
9. Write notes on fixed argument functions and variable BTL -1 Remember
argument functions. (13)
n.
10. (i)Explain the purpose of a function prototype and BTL -3 Apply
specify the difference between user defined function and
aa
built-in functions. (8)
(ii)Write the C program to find the value of sin(x) using
the series up to the given accuracy (without using user
iy
(5)
11. Write a C program for Scientific calculator using built-in
BTL -4 Analyze
functions(13)
.p
13. Write a C program to sort the given N names (13) BTL -2 Understand
w
https://www.poriyaan.in/paper/programming-in-c-22/
www.poriyaan.in https://cse.poriyaan.in/
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
UNIT-IV- STRUCTURES AND UNIONS
SYLLABUS
Introduction to Structures :Array of structures – Nested structure-functions and
Structures-Introduction to union-:practical applications of union ––typedef and
structures-enumerated data type.
PART – A
in
1. Q.No Questions BT Level Competence
n.
1. What is structure? Write the syntax for structure. BTL -1 Remember
aa
2. Write the various operations on structure. BTL -1 Remember
3. How the members of structure object is accessed? BTL -2 Understand
iy
10. Mention any two ways passing structures and functions. BTL -4 Analyze
11. Specify the use of typedef. BTL -3 Apply
12. Generalize the operators used in access the structure
members. BTL -6 Create
https://www.poriyaan.in/paper/programming-in-c-22/
www.poriyaan.in https://cse.poriyaan.in/
15. Invent the application of size of operator to this structure.
Consider the declaration:
struct
{
BTL -6 Create
char name;
intnum;
} student;
in
20 How to differentiate structure and union? BTL -2 Understand
PART – B
1.
n.
Describe about the functions and structures. (13) BTL -1 Remember
aa
2. Explain about the structures and its operations. (13) BTL -2 Understand
3. Demonstrate about structures, array of structures and
iy
https://www.poriyaan.in/paper/programming-in-c-22/
www.poriyaan.in https://cse.poriyaan.in/
10. Explain with an example the self-referential structure.
(13) BTL -4 Analyze
in
n.
employee using Employee Number.
PART-C
aa
Write a structure to store the name, account number and BTL -6 Create
balance of customers (more than 10) and store their
iy
https://www.poriyaan.in/paper/programming-in-c-22/
www.poriyaan.in https://cse.poriyaan.in/
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
UNIT-V- STORAGE CLASS AND PREPROCESSOR DIRECTIVE
SYLLABUS
Introduction to storage classes: Types of storage classes- C preprocessor Directives:
Types of preprocessor directives-Pragma Directive-conditional directive.
PART – A
in
Q.No Questions BT Level Competence
BTL Remember
BTL -4
5. List out the description about storage class specifiers. BTL
BTL -1 Remember
.p
-4
6. Compare extern and static. BTL
BTL -4
-1 Analyze
w
BTL -2
BTL -5
BTL -1
https://www.poriyaan.in/paper/programming-in-c-22/
BTL -2
www.poriyaan.in https://cse.poriyaan.in/
15. Brief on seven conditional directives in c.
BTL -1 Remember
PART – B
1. Describe about the following storage classes
(i) auto.(3)
(ii)external.(3) BTL -1 Remember
(iii)static.(4)
(iv)register.(3)
in
2. Distinguish between the following macro.
(i)object like macro(7)
n.
BTL -2 Understand
(ii)function like macro(6).
aa
3. Illustrate and explain about unconditional preprocessor
directive.(13) BTL -3 Apply
iy
5. Describe the defined operator and #error directive .(13) BTL -1 Remember
.p
10. Write the C coding for finding the average of number Analyze
using any of the storage class declarations.(13) BTL -4
11. Explain about any of the directives along with an BTL -5 Evaluate
example program.(13)
12. Develop a C Program to find the difference between the BTL -4 Analyze
directives.(13)
13. Write a C Program to calculate the factorial of a number BTL -1 Remember
by using the keyword static.(13)
https://www.poriyaan.in/paper/programming-in-c-22/
www.poriyaan.in https://cse.poriyaan.in/
14. Write a C Program to generate Fibonacci series by using BTL -4 Analyze
keyword auto.(13)
PART-C
1 (i) Write the case study of storage classes in C.(10) BTL -6 Create
(ii) Write a C program to narrate all the members of the
storage class.(5)
in
n.
aa
iy
or
.p
w
w
w
https://www.poriyaan.in/paper/programming-in-c-22/
Civil
CSE
Home Mech
e
EEE
CSE –2nd sem Reg 2021 ECE
Physics
Basic for Engineering
Electrical and Data Structure
Problem Solving and Science Engineering
Electronics
Python Programming Object Oriented
Programming in C
Programming
Elective-Management
Professional Elective II
Professional Elective IV