Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
171 views

CS 3353 C Programming and Data Structure QB

Uploaded by

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

CS 3353 C Programming and Data Structure QB

Uploaded by

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

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

QUESTION BANK
CS3353 – C PROGRAMMING AND DATA STRUCTURES
Year/Sem : II / III Faculty:Mr.Athirayan.S

UNIT – 1 – C PROGRAMMING FUNDAMENTALS


PART A
1 Give the length and range of the primitive data types (Dec -19)
2 List the primary data types in C(Dec-18)
3 What are string operations defined in C(Dec-19)
4 What is the static variable? Give example(May-19)
5 Write a C program to get a paragraph of text as input(Dec-19)
6 How an one dimensional arrays is represented(May-19)
7 Differentiate between row and column major representation of arrays(Dec-19)
8 The various data types in C programming(May-19)
9 List all the operators in C programming(May-19)
10 Give example to show the difference between “<” and “<=” operators(May-19)
11 Define enumerated Datatype. (Nov/Dec-22)
12 What will be the output of the following program.
#include<stdio.h>
Int main()
{
Float x=0.1;
If(x==0.1)

Printf(“if “);
Else if (x==0.1f)
Printf (“else if”);
Else
printf(“else”);
} (Nov/dec-21)

13 Differentiate between prefix and postfix increment operator


14 Define datatypes
15 Differentiate break and continue statement (May-23)
16 What is primitive data types
17 What is the difference between for and while statement?
18 Explain the use of void data types?
19 Explain the concepts of sting in C?
20 Differentiate between while and do-while loops?
21 What is the purpose of do-while statement
22 What are the basic operations performed on an array
23 How will you initialize array in C
24 List the various data types in C
25 Write the syntax for Two dimensional array
26 What is meant by Recursion? (May -24)
27 How ternary operator to be used. (May -24)
PART-B
1 Explain the various data types in C with example (May-19)
2 Describe the various operators in C with examples and the associativity(Dec19)
3 Describe the decision making, branching and looping statements in c(Dec-19)
4 Illustrate pass by value and pass by reference in functions with example(May-
19,Dec-18)
5 Explain the recursion and write a c program to the first ‘n’ number in the Fibonacci
series using recursion(Dec-19)
6 Explain conditional statements in C
i)while ii)do while iii)For loop
7 Write a c program to get two numbers and exchange these numbers using pass
value and pass by reference(Dec-18)
8 Explain the various decision making and conditional statements with
examples(Dec-19)
9 Explain the various functions available in C programming with example(Dec-
18/May-19)
10 Write a C program to find the factorial of a number, using recursive
functions(Dec-18)
11 How two dimensional arrays are created in C? Write a C program to generate a
population survey having citizen’s record stored as a collection of year wise
population(May-19)
12 Explain decision making loop in C
i)if ii)if –else iii)if else ladder
13 Write a program to perform the linear search operations on some number of
elements(Dec-18)
14 State and Explain single and Multi-Dimensional Array with Examples (May-24)
Write both iterative and Recursive functions inC to evaluate ab (May- 24)
15 Write a C Program For Double Dimensional Array
A) Find Smallest and Largest Value
B) Find Sum of Non Diagonal Elements
C) Find the Transpose of a Matrix

UNIT – 2 – C PROGRAMMING AND ADVANCED FEATURES


PART A
1 What is the difference between the structure and union(Dec-18)
2 Define preprocessor and list out a few examples(Dec-18/May-19)
3 Define pointer and initialize it(May-19)
4 What does #include<header_name>do How it is possible to tell the preprocessor
where t look for header files(Dec-19)
5 Declare a structure to store student roll number,age,mark in maths,physics and
chemistry(May-19)
6 Define Union(May-19)
7 Define Structure with Syntax(May-18)
8 What is preprocessor directives(May-17)
9 What are the advantages of pointers(May-16)
10 Similarities between structure and union
11 what do you meant by tag of a structure
12 What is the use of dot operator in structures
13 Define structure within a structure
14 Write the use of fprintf and fscanf.
15 Write the use of putw and getw.
16 Define pointer(May-23)
17 What are the file operations?
18 What is pointer to function?
19 Define pointer arithmetic
20 How to initialize Pointers?
21 How to access variable through pointer.
22 What is Strings and pointers?
23 What are the classification of file?
24 How to initialize Structure?
25 what are the advantages of pointers?
PART-B
1 Define a structure to store details of 10 bank customers with customer name,
account no,balance,and city. Write a C program to store the details of customers in
the bank access and print the customer details for a specified account no(May-17)
2 Write a C program to get a 10 student details using structures from the user and
display these details on the screen(Dec-18)
3 Illustrate the representation of structure and union for an employee record having
empid,emp name,DOB,basic pay, allowances, deduction gross pay and
netpay.Examine the memory allocation(May-19)
4 Write a c program to implement any four string handling functions using functions
and pointers(May-17)
5 How to declare pointers to function with example(May-17)
6 Explain the data type enumerator? What are the various operations that can
perform on enumeration?(May-17)
7 Explain about how to declare pointer to function with an example(May-17)
8 Explain the C functions for file handling operations(Dec-17)
9 Explain the structure concepts in details with example(May-17)
10 Write a C program using structures to store roll Num, name, marks in 10 subjects
of 100 students. Calculate the grade of each student and print the student
information .The grades are calculated as follows(Dec-19)
Letter Grade Grade points Marks Range
O(outstating) 10 91-100
A+(Excellent) 9 81-90
A(Very good) 8 71-80
B+(Good) 7 61-70
B(Average) 6 50-60
U/RA 0 <50
11 Explain the Union functions in details with example(May-17)
12 Write a C program using Union to store roll Num, name, marks in 10 subjects of
100 students. Calculate the grade of each student and print the student information .
13 Write a program using pointer to compute the sum of all elements stored in any
array.(May-24)
14 What is a pointer variable? Explain declaration , initialization and accessing a
pointer variable with an example.(May – 24)
15 Write a c program using pointer for searching desired element from the array

UNIT – 3 LINEAR DATA STRUCTURES


PART A
1 What is abstract data type? What are all not concerned in an
ADT?(Dec
2 What is linked list(Dec
3 What is the advantages of linked list over array?(May -24)
4 What is circular linked list(De
5 What is advantages of an ADT?(May
6 Should arrays of linked list be used for the following type of
applications, Justify your answer
a)Many search operations in sorted list
b) Many search operations in unsorted list (May-14)

7 What are abstract data types(Dec-14)


8 What is static linked list? State any two applications o fit(May-15)
9 Write syntax of calloc() and relloc() and mention its applications in the linked
list(May-15)
10 What are the disadvantages of linked list over array(Dec-18)
11 Sate the advantages of circular lists over doubly linked list.
12 Explain the term data structure(May-12)
13 What do you mean by linear data structure(Dec-14)
14 How to delete a last node from single linked list(Dec-18)
15 what do you mean by non linear data structure ? Give example.
16 what do you mean by linear data structure ? Give example.
17 Enlist the various operations that can be performed on data structure.
18 List out the areas in which data structure are applied extensively.
19 State the properties of List ADT with suitable example.(May-24)
20 State the advantage of doubly linked list.
21 Write down the steps to modify a node in linked lists.
22 what is the basic purpose of header of linked list?
23 What are the various operations that can be performed on linked list.
24 what are the applications of linked list.
25 Define stack ADT(May -24)
PART-B
1 Define data abstraction. Write the ADT for the data structure in which the same
condition can be used appropriately for checking over flow and underflow. Define
all basic functions of this ADT(May-19)
2 Explain array based implementation (May14/Dec-18)
3 Consider an array A[1;n].Given a position, write an algorithm to insert an element
in the array If the position is empty, the element is inserted easily, if the position is
already occupied the element should be inserted with the minimum number of
shifts(May-14)
4 What are the various operations on array? Write a procedure to
insert an element in the middle of the array(Dec
5 Explain the concepts of Linked list with its various
types(Dec15,18,19)
6 Explain how the linked list implemented with
example(Dec15,18,19)
7 Write a routine to merge two sorted linked list(Dec-15)
8 Write a C code for single linked list with insert,delete,display
operations using structure pointers(May-16)
9 what are the ways to insert a note in linked list? Write a
algorithm for inserting a node before a given node in a linked
list(Dec-18)
10 Explain the insertion operation linked list. How nodes are inserted after a specific
node(Dec-19)
11 Explain the double linked list operations. Write a C program to implement the
double linked list(Dec-15,May-16)
12 Write a program for implementing linked priority queue
13 Write a program for implementing Stack
14 Write a program to convert infix to post fix conversion
15 Assume a singly linked list where each node contains student details like name
rollno and percentage of marks write a c function count() to traverse the linked list
and count how many students have obtain more than 60%

UNIT – 4 NON – LINEAR DATA STRUCTURES


PART A
1 What is a level of a tree(Dec-19)
2 How is binary tree represented using an array give example(Dec-5)
3 Construct an expression tree for the expression A+(B-C)*D*(E+F)(May-6)
4 Define binary search tree(May-7,8,Dec-9,19)
5 List the operations defined on binary trees data types with the suitable
example(May-09)
6 Write an algorithm to declare notes of a tree structure(May-10)
7 What is meant by equivalent binary tree(May-11)
8 List the applications of tree(Dec-11)
9 Define binary tree and give binary tree node structure(Dec-12_
10 The depth of the complete binary tree is 8 and compute the number of nodes in
leaf(May-19)
11 How to resolve null links in a binary tree(May-19)
12 What is Hashing(May-16)
13 What is Rehashing(Dec-15)
14 What are the advantages and disadvantages of separate chaining and linear
probing(Dec-18)
15 What is the difference between linear and non linear data search
16 Give various implementation of Tree
17 List the applications of tree
18 What is full binary tree
19 What is forest?
20 What is sibling node in tree
21 List out the traversal technique used in a tree
22 Which traversals results in elements in sorted ordered
23 List out the various techniques of hashing
24 What is collision in hashing
25 What is the major problem in linear probing
PART-B
1 Explain in detail about tree traversal(Dec-19)
2 Explain the tree traversal techniques with an example (Dec 19)
3 What are expression trees. Write the procedure for constructing an expression tree.
(Dec 18)
4 Write the following routines to implement the basic binary search tree operations
i)Perform search operation in binary search tree.
ii)find_min and find_max (Dec 18)
5 How to insert and delete an element into binary search tree and write down the
code for the insertion routine with an example. (Dec 19)
6 Explain the following collision resolution strategies with examples
i)separate chaining ii)linear probing iii)quadratic probing (Dec-15)
7 Explain the following –rehashing(May-16)
8 Illustrate with example the open addressing and chaining methods of collision
resolution techniques in hashing(May-17)
9 Explain open addressing in detail(Dec18)
10 When do you perform rehashing? Illustrate with example (May-19)
11 Explain in detail about collision handling(May-16,17,19,Dec-15-18)
12 Explain various applications of Hashing
13 Explain the basic concepts in Hashing
14 Explain the following chaining concept
i)chaining without replacement ii)chaining with replacement
15 How to insert and delete an element into binary search tree and write down the
code for deletion with an example

UNIT –5 SORTING AND SEARCHING TECHNIQUES


PART A
1 Differentiate between internal and external sorting(Dec-14,19)
2 List the sorting algorithm which uses logarithmic time complexity(May-14)
3 Compare linear search and binary search(May-19,Dec-15)
4 Give any two application of sorting (Dec-18)
5 What is the need for sorting
6 What is the basic principle behind the quick sort
7 What do you meant by heap
8 Explain why binary search cannot be performed using linked list
9 What are the advantages binary search over linear search
10 Enlist four internal sorting technique.
11 What is the importance of sorting and searching techniques?
12 What is the meaning of sort key.
13 Define heap sort with example.
14 Identify the principle behind the external sorting algorithm.(April/May 23)
15 Name the application of linear and binary search techniques. (April/May 22)
16 Give the time complexity for linear search
17 Give the time complexity for binary search
18 What are the various sorting techniques
19 What are the various searching techniques
20 What is order of sorting
21 Define quick sort
22 What is the role of pivot element in quick sort
23 How to construct heap
24 What is min heap with example
25 What is max heap with example

PART-B
1 Explain binary searching(May-16)
2 Write a C program to search a number with a given set of number using binary
search(May-17)
3 Distinguish between linear search and binary search, state and explain the
algorithm for both search with example(Dec-18)
4 Write a algorithm for binary search with suitable example(Dec-19)
5 .Explain in detail about insertion sort(May-19)
6 Write a routine for insertion sort ,sort the following sequence using insertion sort
3,10,4,2,8.6.5.1(May-19)
7 Explain heap sort with example(Dec-7,8,9,10,11,12,May-10,11,12)
8 Sort the flowing numbers using merge sort algorithm 11,8,55,22,33,27,62,35,71
obtain the worst case and average case time complexity(Dec-15,18)
9 Write a function to perform merge sort give example(May-19)
10 Explain in detail about various searching technique(May-16,17,Dec-18,19)
11 State algorithm to sort element of a given array in ascending order using heap sort
.Sort the following numbers using hep sort 48,0,-1,82,108,72,54

12 Sort the following data in ascending order using quick sort show all passes with
pivot element 17,18,-9,2,0,-5,7,20.11,15
13 write a C program to perform the linear search operation on some number of
elements
14 Write a C program to implement non recursive binary search algorithm
15 Write a algorithm for recursive binary search with an example

Signature of the faculty Signature of the HOD

You might also like