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

C Programming and Data Structures(20CS0501)

Btech

Uploaded by

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

C Programming and Data Structures(20CS0501)

Btech

Uploaded by

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

Course Code: 20CS0501 R20

SIDDHARTH INSTITUTE OF ENGINEERING & TECHNOLOGY:: PUTTUR


(AUTONOMOUS)
Siddharth Nagar, Narayanavanam Road – 517583
QUESTION BANK

Subject with Code: (20CS0501) C Programming and Data Structures


Course & Branch: B.Tech –Common to All
Year & Sem : I-B.Tech & I-Sem Regulation: R20

UNIT –I
INTRODUCTION TO C LANGUAGE

1 a List different C language elements [L2][CO1] [4M]


b Explain the C language elements with example [L2][CO1] [8M]
2 a Define a variable. Write the variable declaration. What are the rules [L2][CO1] [6M]
for declaring a variable?
b Explain about data types in C. [L2][CO1] [6M]
3 a Describe the Structure of C Program with an example. [L2][CO1] [6M]
b Explain about Input and Output functions with examples. [L2][CO1] [6M]
4 a List out the various operators available in C [L1][CO1] [2M]
b Discuss about following operators [L2][CO1] [10M]
i. Arithmetic Operator
ii. Logical Operator
iii. Conditional Operator
iv. Increment/Decrement Operator
v. Assignment Operator
5 a Explain briefly about Expressions statements [L2][CO2] [4M]
b Explain about precedence and associativity in C. [L2][CO1] [4M]
c Define type conversion. What are different types of type conversions? [L1][CO1] [4M]
Explain with example.
6 a List the different decision statements available in C [L4][CO2] [4M]
b Discuss each decision statement with suitable example [L2][CO2] [8M]
7 Write the syntax and illustrate the following statements with example [L3][CO2] [12M]
i) if Statement
ii) if else Statement
iii) else if ladder
iv) Nested if statements
v) Switch Case
8 a Compose a C Program to find whether the given number is even or [L6][CO2] [3M]
odd.
b Compose a C Program to find greatest of three numbers using nested [L6][CO2] [3M]
if else statement.
c Write a C Program to find largest of five numbers using ladder [L6][CO2] [3M]
if...else.
d Write a C program to perform arithmetic operation using switch case [L6][CO2] [3M]
statement.
Course Code: 20CS0501 R20
9 a Mention the different looping statements with syntax in C [L2][CO2] [4M]
b Discuss the below looping statements with example [L2][CO1] [8M]
i. While Loop ii. For loop
10 a Construct a C Program to Perform Fibonacci series using for loop [L6][CO3] [3M]
b Give the difference between while and do-while with c program [L4][CO2] [3M]
to display 1 to 10.
c Write the syntax and illustrate goto, break and continue statements. [L3][CO2] [6M]
Course Code: 20CS0501 R20
UNIT –II

ARRAYS, FUNCTIONS and STRINGS

1 a Define an Array. Write the syntax for declaring and initializing [L1][CO3] [4M]
array with example.
a Describe the array subscript in C with example [L2][CO2] [3M]
b Write a C program to display array of elements in given and [L6][CO2] [5M]
reverse order.
2 a Explain multidimensional array with syntax. [L2][CO3] [2M]
b Write a C program to perform matrix addition. [L6][CO3] [5M]
c Write a C program to perform matrix multiplication. [L6][CO3] [5M]
3 a Define function. Explain the types of functions with an [L1][CO3] [6M]
example.
b Write a C program to swap two numbers using functions. [L3][CO3] [6M]
4 a Explain the library functions available in C? [L3][CO3] [4M]
b Give in detail how communication is established among functions [L3][CO4] [8M]
in C language?
5 a Distinguish between call by value and call by reference with an [L4][CO3] [6M]
example programs.
b How to use Array as Function argument? Explain with an example [L2][CO3] [6M]
program.
6 a Write a c program for addition of two numbers using function [L3][CO3] [6M]
b Describe about scope and distinguish between local and global [L2][CO2] [6M]
variable
7 a Examine the types of storage class available in C. [L5][CO3] [6M]
b Describe about type qualifiers used in C. [L2][CO2] [6M]
8 a Define recursion. Create a C program for factorial of a given [L6][CO2] [6M]
number using function recursion.
b What is meant by preprocessor commands? List any four with [L1][CO3] [6M]
definition and syntax.
9 Define String. Explain the different string handling functions with [L4][CO3] [12M]
example.
10 a Create a C program to count the vowels, consonants, special [L6][CO2] [6M]
symbols and space in a given string.
b Create a C program to perform the following string library [L6][CO2] [6M]
function strlen(), strcpy(), strcat(), strcmp().
Course Code: 20CS0501 R20
UNIT –III
POINTERS, STRUCTURES & UNIONS

1 a Define pointer. Write the syntax for declaring pointer with example. [L1][CO3] [6M]
b Describe about pointers and arrays [L2][CO3] [6M]
2 a Explain the concept of array of pointers with examples. [L2][CO3] [8M]
b What are the features of pointers? Write a C program to print address [L6][CO3] [4M]
of a variable.
3 a Explain the concept of pointer to pointers with examples. [L2][CO3] [6M]
b Explain the concept of void pointers with examples. [L2][CO3] [6M]
4 a List the dynamic memory management functions in C. [2M]
b Explain the following with example
i. malloc() ii. calloc() iii. realloc() and iv. free()
5 a Distinguish between malloc(), calloc(), realloc() and free() [L4][CO3] [6M]
b How to pass a pointer to a function? Explain. [L2][CO2] [6M]
6 a How can pointer works on strings? [L2][CO2] [6M]
b Examine the access to address of the pointer with example? [L3][CO3] [6M]
7 a Define structure and give the general syntax for structure. Write a [L1][CO3] [6M]
suitable example program.
b Explain to declare and initialize a structure? Mention with an [L2][CO3] [6M]
example.
8 a Define structure within a structure? Explain with an example. [L1][CO3] [6M]
b Describe about array of structures. [L2][CO3] [6M]
9 a Explain about pointers to structure. [L2][CO3] [6M]
b Explain about nested structures. [L2][CO3] [6M]
10 a Illustrate the use of typedef with suitable example. [L3][CO3] [6M]
b Explain bit fields concept [L2][CO3] [6M]
11 a Explain about Enumerated data type. [L2][CO3] [4M]
b Define union and give the general syntax for union. Write a suitable [L3][CO4] [8M]
example.
12 a Give difference between the structure and union. [L4][CO4] [6M]
b Create a C program for size of data using union [L6][CO2] [6M]
Course Code: 20CS0501 R20
UNIT –IV
DATA STRUCTURES and LINKED LIST

1 a What is data structure? Explain types of data structures. [L1][CO5] [6M]


b What is a stack? Write the representation of stacks. [L1][CO5] [6M]
2 List the various operations that can be performed on stack? Explain with [L2][CO5] [12M]
suitable example.
3 a Construct an empty stack and perform PUSH operation for any five [L6][CO5] [6M]
elements. Also perform POP operation for two elements and show the
value on top of the stack.
b What do you mean by stack overflow and stack underflow? [L1][CO5] [6M]
4 a List the applications of stack [L1][CO5] [6M]
b What is a queue? What are various operations that can be performed [L1][CO5] [6M]
on them? Explain with an example.
5 a Explain briefly about various types of queues with suitable examples. [L2][CO5] [6M]
b List the applications of queue [L1][CO5] [6M]
6 a Differentiate between stack and queue [L4][CO5] [6M]
b Explain briefly about various types of linked lists with suitable [L2][CO6] [6M]
examples.
7 a Illustrate the following operations in double linked list [L3][CO6] [8M]
i) Create an empty list
ii) Insert the elements 10 and 20 at the front of the list.
iii) Insert the element 30 at the middle of the list.
iv) Insert the element 15, 45 at the end of the list.
v) Delete the middle element from the list.
b Explain the following single linked list operations: [L2][CO6] [4M]
a. Insertion of a node
b. Deletion of node
8 Explain briefly about circular linked list and circular double linked list with [L2][CO6] [12M]
suitable example.
9 a Distinguish between singly linked list and doubly linked list [L4][CO6] [6M]
b List the applications of linked list. [L1][CO6] [6M]
Course Code: 20CS0501 R20
UNIT –V
SEARCHING and SORTING
1 a Explain about linear search with algorithm [L2][CO6] [6M]

b Explain about binary search with algorithm [L2][CO6] [6M]

2 What do you mean by Searching? Explain sequential search and [L1][CO6] [12M]
binary search with suitable example.
3 a Compare binary search and linear search techniques. [L4][CO6] [6M]
b Explain binary search algorithm for finding given element is in [L2][CO6] [6M]
the list or not.
4 Define sorting. Explain any three sorting techniques with example. [L1][CO6] [12M]
5 Discuss the algorithm to sort the elements using exchange sort. [L2][CO6] [12M]

6 a Explain exchange sort with an example. [L2][CO6] [6M]


b Explain insertion sort with an example. [L2][CO6] [6M]
7 a Explain selection sort. Sort the following numbers using selection [L5][CO6] [6M]
sort : 24,9,29,14,19,27,50,10,30
b Sort the following numbers using selection sort : [L5][CO6] [6M]
45,25,10,2,9,85,102,1
8 Explain the algorithm for merge sort and give a suitable example. [L2][CO6] [12M]
9 Order the following numbers using merge sort : [L5][CO6] [12M]
45,34,12,46,27,56,11,87,6,33,28
10 Explain the algorithm for quick sort and give a suitable example. [L2][CO6] [12M]
11 a Explain the difference between merge sort and quick sort. [L2][CO6] [6M]
b Sort the following numbers using quick sort: [L4][CO6] [6M]
54,26,93,17,77,31,44,55,20
Prepared by: Dr.J. Sridhar, Mrs. R.Surekha, Mrs. K. Sirisha, Ms. K.Maheswari,
Ms.S. Maabuni and Mr.C.H.Sivasankar

You might also like