C Programming and Data Structures(20CS0501)
C Programming and Data Structures(20CS0501)
UNIT –I
INTRODUCTION TO C LANGUAGE
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
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]