Coding questions
Coding questions
in
CS 3251 Programming in C
Important Questions
SUBJECT : Programming in C
SEM / YEAR:Second Semester / 1st Year
n
SYLLABUS
e.i
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 -
Compilation process.
Q.No Questions
fre
PART - A
BT Level Competence
1. Define programming paradigm. BTL -1 Remember
tes
2. Give the definition for flowchart and pseudo code. 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
No
main()
{
int a = 20, b = 10, c = 15, d = 5; BTL -3 Apply
int e;
e = (a + b) * c / d;
printf("Value of (a + b) * c / d is : %d\n", e );
}
13. What is header file? why they are important? BTL -1 Remember
www.Notesfree.in
www.Notesfree.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
n
PART - B.
e.i
1. Describe the structure of a C program with an
example.(13) BTL -1 Remember
3. fre
Illustrate about the various data types in ‘C’ and write a
C program to find the sum of 10 non-negative numbers
entered by the user.(13)
BTL -3 Apply
www.Notesfree.in
www.Notesfree.in
n
series.(7)
(ii). To find the factorial of a given number.(6)
e.i
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 :
1. fre
(i) To check whether a number is prime or not.(8)
(ii). To convert the temperature given in Fahrenheit to
Celsius and vice versa.(7)
Compare and contrast branching and looping
BTL -6 Create
with an example.(15)
w.
ww
www.Notesfree.in
www.Notesfree.in
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
n
SYLLABUS
e.i
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
arguments.
Q.No
1. List out the features of Arrays.
fre
PART - A
Questions BT Level
BTL -1
Competence
Remember
2. Define a float array of size 5 and assign 5 values to it.
BTL -1 Remember
tes
3. Identify the way to assign an array to another array. BTL -4 Analyze
4. What is an array? Write the syntax for array.
BTL -1 Remember
5. What will happen when you access the array more than
No
BTL -1 Remember
its dimension?
6. Point out an example code to express two dimensional
BTL -4 Analyze
array.
7. How to create a two dimensional array? BTL -2 Understand
w.
www.Notesfree.in
www.Notesfree.in
n
printf(“%d \n”,x);
}
e.i
18. Specify any two methods of sorting. BTL -5 Evaluate
19. List out the any four functions that are performed on
BTL -1 Remember
character strings.
20. Write the output of the following Code:
main()
{
fre
static char name[]=”KagzWrxAd”
inti=0;
while(name[i]!=’\0’) BTL -2 Understand
tes
{
printf(“%c”,name[i]);
i++;
} }
No
PART -B
1. (i) Explain the need for array variables. Describe
thefollowing with respect to arrays.Declaration of array
and accessing an array element. (6) BTL -1 Remember
(ii) Write a C program to re-order a one-dimensional
w.
user will enter the order of a matrix and then its elements
and similarly input the second matrix. If the entered BTL -4 Analyze
orders of two matrices are such that they can’t be
multiplied by each other, then an error message is
displayed on the screen.(13)
3. .Write a C program to calculate median for an array of
BTL -5 Evaluate
elements.(13)
4. Write a C program for Determinant of a matrix.(13) BTL -4 Analyze
www.Notesfree.in
www.Notesfree.in
n
array. (13) BTL -6 Create
e.i
BTL -1 Remember
detail (13)
11. Write a C program to find whether the given string is
palindrome or not without using string functions. (13) BTL -3 Apply
12.
Describe with their purpose.(5)
fre
(i)What are the different types of string function?
www.Notesfree.in
www.Notesfree.in
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
UNIT III-FUNCTIONS
n
SYLLABUS
Introduction to functions: Classification of functions- function definition-function call-
e.i
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? BTL -1 Remember
2.
3.
fre
What are the various parts of functions?
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
www.Notesfree.in
www.Notesfree.in
n
5. Explain in detail about Pass by Value and Pass by BTL -1 Remember
reference. (13)
e.i
6. Discuss about passing arrays to function. (13) BTL -2 Understand
7. Explain in detail about recursive function with sample Evaluate
BTL -5
code. (13)
8. Explain in detail about function. (13) BTL -4 Analyze
9. Write notes on fixed argument functions and variable BTL -1 Remember
10.
argument functions. (13) fre
(i)Explain the purpose of a function prototype and
specify the difference between user defined function and
BTL -3 Apply
PART-C
1. Develop a C program for binary search using recursive
BTL -6 Create
function.(15)
2. Examine with example program for different types of
BTL -5 Evaluate
ww
www.Notesfree.in
www.Notesfree.in
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
UNIT-IV- STRUCTURES AND UNIONS
n
SYLLABUS
Introduction to Structures :Array of structures – Nested structure-functions and
e.i
Structures-Introduction to union-:practical applications of union ––typedef and
structures-enumerated data type.
PART – A
1. Q.No
1.
2.
Questions
fre
What is structure? Write the syntax for structure.
Write the various operations on structure.
BT Level
BTL -1
Competence
Remember
BTL -1 Remember
3. How the members of structure object is accessed?
tes
BTL -2 Understand
4. Write the use of size operator on structure. BTL -1 Remember
5. What is a nested structure? BTL -1 Remember
6. How typedef is used in structure? BTL -4 Analyze
No
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
ww
www.Notesfree.in
www.Notesfree.in
n
18. Discriminate copying and comparing operation on
e.i
structures. BTL -5 Evaluate
1.
fre
PART – B
BTL -1 Remember
2. Explain about the structures and its operations. (13) BTL -2 Understand
tes
3. Demonstrate about structures, array of structures and
nested structures.(13) BTL -3 Apply
www.Notesfree.in
www.Notesfree.in
n
details.(13)
14. Define a structure called student that would contain
e.i
name, regno and marks of five subjects and percentage.
Write a program to read the details of name, regno and
marks of five subjects for 30 students, calculate the
BTL -4 Analyze
percentage and display the name, regno, marks of the
subjects and percentage of each student(13)
Write a structure to store the name, account number and BTL -6 Create
tes
balance of customers (more than 10) and store their
1 information. Write a function to print the names of all the
customers having balance less than $200.(15)
BTL -5 Evaluate
(15)
Examine the differences between nested structures and
3 array of structures.(15) BTL -5 Evaluate
www.Notesfree.in
www.Notesfree.in
SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year
n
UNIT-V- STORAGE CLASS AND PREPROCESSOR DIRECTIVE
SYLLABUS
e.i
Introduction to storage classes: Types of storage classes- C preprocessor Directives:
Types of preprocessor directives-Pragma Directive-conditional directive.
PART – A
Q.No
1.
Questions
BTL -1
BTL -1
Competence
Remember
Remember
2. Mention different type of storage classes.
3. Distinguish between auto and register BTL -2
-5
tes
BTL Understand
BTL -1
4. What is meant by extern? Give an example. BTL -1
BTL -1 Remember
BTL -4
5. List out the description about storage class specifiers. BTL
BTL -1
-4 Remember
No
BTL -2
BTL -5
BTL -1
www.Notesfree.in
BTL -2
www.Notesfree.in
n
PART – B
1. Describe about the following storage classes
e.i
(i) auto.(3)
(ii)external.(3) BTL -1 Remember
(iii)static.(4)
(iv)register.(3)
2.
3.
(ii)function like macro(6).
fre
Distinguish between the following macro.
(i)object like macro(7)
5. Describe the defined operator and #error directive .(13) BTL -1 Remember
No
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)
www.Notesfree.in
www.Notesfree.in
n
3 Develop a C Program based on conditional directive. BTL -6 Create
(15)
e.i
4 Examine with example the different storage classes in
C.(15) BTL -5 Evaluate
fre
tes
No
w.
ww
www.Notesfree.in
Civil
www.Notesfree.in CSE
Home Mech
e
EEE
CSE –2nd sem Reg 2021 ECE
n
Computer Organization
Engineering Graphics
Engineering Physics
e.i
Foundation of Data
Physics for Information
Science Science
Engineering Chemistry
Physics
Basic for Engineering
Electrical and Data Structure
Problem Solving and
fre
Science
Electronics Engineering
Python Programming Object Oriented
Programming in C
Programming
Cryptography and
Database Management Cyber Security Open Elective I
System
Professional Elective III
Algorithms Distributed Computing
Professional Elective IV
Professional Elective I
w.
Elective-Management
Professional Elective II
Professional Elective IV
www.Notesfree.in