0% found this document useful (0 votes)
3 views

Coding questions

The document contains important questions and syllabus details for a Programming in C course for first-year students in their second semester. It covers various topics including basics of C programming, arrays and strings, and functions, with a list of questions categorized into parts A, B, and C for assessment. Each question is associated with a Bloom's Taxonomy level to gauge the expected competence and understanding required from the students.

Uploaded by

Sabari Abishek
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Coding questions

The document contains important questions and syllabus details for a Programming in C course for first-year students in their second semester. It covers various topics including basics of C programming, arrays and strings, and functions, with a list of questions categorized into parts A, B, and C for assessment. Each question is associated with a Bloom's Taxonomy level to gauge the expected competence and understanding required from the students.

Uploaded by

Sabari Abishek
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

www.Notesfree.

in

CS 3251 Programming in C
Important Questions
SUBJECT : Programming in C
SEM / YEAR:Second Semester / 1st Year

UNIT I - BASICS OF C PROGRAMMING

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

6. Identify the use of ternary or conditional operator. BTL -4 Analyze


7. What is mean by Operators precedence and associative?
BTL -2 Understand
8. What is the structure of C program? BTL -1 Remember
9. How to create enumeration constants? BTL -4 Analyze
w.

10. Differentiate between an expression and a statement in BTL -4 Analyze


C.
11. What is the output of the programs given below?
#include <stdio.h>
ww

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 );
}

12. Generalize the types of I/O statements available in ‘C’.


BTL -6 Create

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

19. Classify the narration of compiler and interpreter. BTL -3 Apply


20. Differentiatebetween formatted and unformatted input
BTL -2 Understand
statements. Give one example for each.

n
PART - B.

e.i
1. Describe the structure of a C program with an
example.(13) BTL -1 Remember

2. Discuss about the constants, expressions and statements


in ‘C’. (13) BTL -2 Understand

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

4. (i) Explain the different types of operators used in ‘C’


tes
with necessary program. (8)
BTL -2 Understand
(ii) Write a C program to check the integer is
Palindrome or not.(5)
5. Explain the purpose of decision making and looping
statement.Explain in detail the operation of various BTL -1 Remember
No

looping statements in C with suitable examples.(13)


6. Write short notes on the following: (5+4+4)
(i). ‘for’ loop
(ii). ‘while’ loop BTL -1 Remember
(iii). ‘do…while’ loop
w.

7. Illustrate a program for adding two numbers with the


BTL -3 Apply
help of flowchart. (13)
8. Discuss about pseudo code and explain with an
example(13) BTL -2 Understand
ww

9. Explain the following:


i. Keywords (3) ii. Identifiers (3)
iii. C character set (3) BTL -5 Evaluate
iv. Constants (4).
10. Write a C program for the following :
(i). To check whether a given year is leap or not.(5) BTL -4 Analyze
(ii). To find the roots of a quadratic equation.(8)

www.Notesfree.in
www.Notesfree.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
BTL -1 Remember

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

2. statements.(15) BTL -5 Evaluate


tes
Design a C program to convert the given decimal number
3. into binary, octal and hexadecimal numbers. (15) BTL -6 Create

Summarize on algorithm, flowchart and pseudo code


4. BTL -5 Evaluate
No

with an example.(15)
w.
ww

www.Notesfree.in
www.Notesfree.in

SUBJECT : Programming in C
SEM / YEAR : Second Semester / 1st Year

UNIT II -ARRAYS AND STRINGS

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.

8. What is the method to equate an array? BTL -3 Apply


9. Distinguish between one dimensional and two
BTL -4 Analyze
dimensional arrays.
10. What are the different ways of initializing array? BTL -2 Understand
ww

11. What is the use of ‘\0’ and ‘%s’? BTL -1 Remember


12. Is address operator used in scanf() statement to read an
array? Why? BTL -6 Create

13. What is the role of strrev()? BTL -3 Apply


14. Show a C function to compare two strings. BTL -3 Apply
15. How to initialize a string? Give an example. BTL -6 Create

www.Notesfree.in
www.Notesfree.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

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.

array of numbers in descending order. (7)


2. Write a C program to multiply two matrices (two-
dimensional array) which will be entered by a user. The
ww

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

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

6. Write a C program for transpose of a matrix.(13) BTL -1 Remember


7. Discuss about the runtime initialization of a two BTL -1 Remember
dimensional array.(13)
8. Write a C program to sort the n numbers using selection
sort. (13) BTL -2 Understand

9. Develop a C program to search an element from the

n
array. (13) BTL -6 Create

10. Explain about the String Arrays and its manipulation in

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?

(ii)Write the C program to find the number of Vowels, BTL -2 Understand


Constants, Digits and white space in a string. (8)
tes
13. Illustrate with an example ofcommand line arguments.
BTL -3 Apply
(13)
14. Explain about the following :
(i).String and character array.(4)
No

(ii).Initializing a string variables.(4) BTL -4 Analyze


(iii).String input and output (5)
PART-C
Write a C program to find average marks obtained by a BTL -6 Create
1. of 30 students in a test.(15)
w.

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
ww

Compare and contrast gets() and puts().(15)


4. BTL -5 Evaluate

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?

Express the difference between function declaration and


BTL -1 Remember

function definition. BTL -2 Understand


tes
4. What is function call? BTL -1 Remember
5. What is recursion? BTL -1 Remember
6. Differentiate between call by value and call reference.
BTL -4 Analyze
No

7. Why is scope of variable necessary in function? BTL -2 Understand


8. Identify the use of functions. BTL -1 Remember
9. Point out themeaning of user-defined function. BTL -4 Analyze
w.

10. What is meant by library function? BTL -4 Analyze


11. Show the difference in call by value and reference using
BTL -6 Create
a simple programming example.
ww

12. When will be the library function used? BTL -3 Apply


13. What is a function call? Give an example of a function
call. BTL -3 Apply

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

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)

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

built-in functions. (8)


(ii)Write the C program to find the value of sin(x) using
tes
the series up to the given accuracy (without using user
defined function) also print sin(x) using library function.
(5)
11. Write a C program for Scientific calculator using built-in
BTL -4 Analyze
functions(13)
No

12. What is difference between pass by value and pass by


reference? Write the C coding for swapping of two BTL -1 Remember
numbers using pass by reference(13)
13. Write a C program to sort the given N names (13) BTL -2 Understand
14. Explain about any 4library functions in c.(13) BTL -6 Create
w.

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

user defined functions .(15)


3. Develop a C program for towers of Hanoi using
BTL -6 Create
recursive function.(15)
4. Illustrate a C program for cube of a number using pass
by reference.(15) BTL -5 Evaluate

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

7. Interpret the term Union in C. BTL -2 Understand


8. What is meant by Self-referentialstructures. BTL -1 Remember
9. Point out the meaning of array of structures.
BTL -4 Analyze
w.

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

13. Discover the meaningof enum. BTL -3 Apply


14. Show the difference between Structures from Array. BTL -3 Apply

www.Notesfree.in
www.Notesfree.in

15. Invent the application of size of operator to this structure.


Consider the declaration:
struct
{
BTL -6 Create
char name;
intnum;
} student;

16. Show an example program using union


BTL -2 Understand

17. Summarize the different operations on enum.


BTL -5 Evaluate

n
18. Discriminate copying and comparing operation on

e.i
structures. BTL -5 Evaluate

19. If we have structure B nested inside structure A, when do


we declare structure B? BTL -1 Remember

20 How to differentiate structure and union? Understand

1.
fre
PART – B

Describe about the functions and structures. (13)


BTL -2

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

4. Write a C program using structures to prepare the


students mark statement. (13) BTL -2 Understand
No

5. Write a C program using structures to prepare the


employee pay roll of a company. (13) BTL -2 Understand

6. Write a C program to read the details of book name,


author name and price of 200 books in a library and
display the total cost of the books and the book details BTL -1 Remember
w.

whose price is above Rs.500. (13)

7. (i).What is a structure? Express a structure with data


members of various types and declare two structure
variables. Write a program to read data into these and BTL -3 Apply
ww

print the same. (8)


(ii).Justify the need for structured data type.(5)
8. (i).Does structure bring additional overhead to a
program? Justify. (7) BTL -1 Remember
(ii). Write short note on structure declaration(6)
9. (i).How to access enumerated datatype and explain with
an example program.(7)
(ii). Referencing pointer to another address to access the BTL -6 Create
memory(6)

www.Notesfree.in
www.Notesfree.in

10. Explain with an example the self-referential structure.


(13) BTL -4 Analyze

11. Explain nested structure and write C Program to BTL -5 Evaluate


Implement the same. (13)

12. Discuss about the following :- BTL -4 Analyze


(i).Structure.(7)
(ii).Union.(6)

13. Illustrate a C program to store the employee information BTL -1 Remember


using structure and search a particular employee

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)

employee using Employee Number.


fre
PART-C

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)

Compare and contrast between Structures and Unions.


2
No

BTL -5 Evaluate
(15)
Examine the differences between nested structures and
3 array of structures.(15) BTL -5 Evaluate

Develop a C Program to use the arrays inside union BTL -6 Create


4 variables.(15)
w.
ww

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

Define storage class specifier.


fre BT Level

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

6. Compare extern and static. BTL


BTL -4
-1 Analyze
7. How will you explain preprocessor in C ? BTL
BTL -6
-2 Create
BTL Understand
8. Why conditional and unconditional directives are BTL -1
-4 Remember
needed? BTL
9. How to pragma directive works? BTL -4
-3 Analyze
w.

10. Compare the pragma and conditional directive. BTL


BTL -4
-6 Analyze
11. Examine the six pragma directives BTL -3
BTL -3 Apply
BTL -3
ww

12. Write the syntax of pragma directive.


BTL -2 Understand
BTL -6
13. Demonstrate pragma directive with example
BTL -3 Apply

14. Identify the use of pragma directive in c. BTL -2


BTL -3 Apply

BTL -2
BTL -5

BTL -1
www.Notesfree.in
BTL -2
www.Notesfree.in

15. Brief on seven conditional directives in c.


BTL -1 Remember

16. What is the use of #if directive. BTL -2 Understand

17. Write a note on define macro. BTL -5 Evaluate


18. Tell the working of header file inclusion BTL -5 Evaluate

19. Describe conditional compilation. BTL -6 Create

20 What does #undef, #pragma indicate in c? BTL -2 Understand

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)

Illustrate and explain about unconditional preprocessor


BTL -2 Understand

directive.(13) BTL -3 Apply


tes
4. Explain about #if, #else ,#elif directive with an example
program.(13) BTL -2 Understand

5. Describe the defined operator and #error directive .(13) BTL -1 Remember
No

6. Write a C Program to compare all storage classes and


explain with an example.(13) BTL -1 Remember

7. Write about conditional preprocessor directive with an


example.(13) BTL -3 Apply

8. Write a C Program to use any two concepts of pragma


w.

directive.(13) BTL -2 Understand

9. Write about all the pragma directive and explain in


detail.(13) BTL -6 Create
ww

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

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)

2 Summarize preprocessor directives in C. Give suitable


BTL -5 Evaluate
examples. (15)

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

2nd Semester 3rd Semester


1st Semester
Professional English II Discrete Mathematics
Professional English I
Statistics and Numerical
Methods Digital Principles and
Matrices and Calculus

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

4th Semester 5th Semester 6th Semester


tes
Theory of Computation Computer Networks Object Oriented Software
Engineering
Artificial Intelligence Compiler Design
and Machine Learning Embedded Systems IoT
No

Cryptography and
Database Management Cyber Security Open Elective I
System
Professional Elective III
Algorithms Distributed Computing
Professional Elective IV
Professional Elective I
w.

Introduction to Operating Professional Elective V


Systems
Professional Elective II Professional Elective VI
Environmental Sciences
and sustainability Mandatory Course I Mandatory Course II
ww

7th Semester 8th Semester


Human Values and Ethics Project Work/Internship

Elective-Management

Professional Elective II

Professional Elective III

Professional Elective IV
www.Notesfree.in

You might also like