[go: up one dir, main page]

0% found this document useful (0 votes)
96 views6 pages

Question-Bank-MCA101 - C - DS

Uploaded by

ramkrushna.yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views6 pages

Question-Bank-MCA101 - C - DS

Uploaded by

ramkrushna.yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

PATEL GROUP OF INSTITUTIONS

INDORE (M.P.)

Department of Computer Application

MCA Ist Yr Ist Sem

PROGRAMMING IN C WITH
DATA STRUCTURE
MCA-101

Question Bank

Programming In C with Data Structure


QUESTION BANK

Prepared By: Dr. Dhanraj Verma


Unit -1 : Fundamental of C Programming
Sl. Questions
No
1 Explain the basic structure of a C program with an example

2 What is Token? What are the different types of token available in C language
3 Write and explain the basic concepts of a C program
What is an identifier (variable)? What are the rules to construct identifier (variable)? Classify
4 the following as valid/invalid Identifiers.
i) num2 ii) $num1 iii) +add iv) a_2 v) 199_space vi) _apple vii)#12
What is variable? List the restrictions on the variable names. Explain the rules for constricting
5
variables in C language.

6 What are basic data types available in „C‟? Write the significance of each data type

7 What is an operator? List and explain various types of operators

8 Write a C program that computes the size of int, float, double and char
9 List all conditional control statements used in C. Explain any two with syntax and example
What is two way selection statements? Explain if, if else, and cascaded if-else with
10
examples.
11 Write a C program to find the biggest of three numbers.

12 Explain switch statement with syntax and example.


List the differences between while loop and do-while loop. write a C program to find sum of
13
Natural numbers from 1 to N using for loop.
Write a C program to find the factorial of a number using do-while, where the number n is
14
entered by user.
15 Write a C program to find GCD of two numbers using ternary operator and for loop
Write a calculator program in C language to do simple operations like addition, subtraction,
16
multiplication and division. Use switch statement in your program.
17 What is function? Explain the difference between user defined and library functions.
18 Write a c-program using functions to check whether the given number is prime or not.
Define a Recursion. Write a C recursive function for multiplying two integers
19
where a function call is passed with two integers m and n.
20 Write a C program to check a number is a prime or not using recursion
Unit : II Array and Strings
Sl. Questions
No
What is Array? Explain the declaration and initialization of one dimensionaland two
1
dimensional arrays with an example.
2 Define Multi Dimention Array.
Write a C program that accepts (3×3 ordered matrices A and B),and compute
3
the following (i)summation of Two numbers (ii) Subtraction of Two numbers

4 Write a C program to find the sum and average of n integer numbers.


Define string. How string is declared and initialized? Explain string input/output functions
5
with an example.
Write a C program to check whether the given string is palindrome or not without using in built
6 function.

7 What is structure? Explain the C syntax of structure declaration with example

8 Explain array of structure and structure within a structure with an example


Write a C program to maintain a record of „n‟ students details using an array of structures with four
9 fields(roll no, name, marks, and grade).Assume appropriate data type for each field. Print the marks
of the student given the student name as input.
10 Write a C program to pass structure variable as function argument
11 Explain the difference between array and structures
What is a pointer? Write a C program to find the sum and mean of all elements in an array using
12 pointer.
Explain the array of pointes with example? or Explain how pointers and arrays are related
13
with example
Discuss about dynamic memory allocation with suitable example C program. What are the
14
various dynamic memory allocation functions?
Define passing array as function. Write a C program to sort the elements by
15
passing array as function argument.
Define file. Write a C Program to Copy the contents of one file inti another file in the Upper
16
case.
17 What is Union? Explain the C syntax of union declaration with example
Write the functions for random access file processing.
18
1. fseek() 2. ftell() 3. rewind()

19 Explain List the Types of Files.


20 How to open a file? List the opening modes in standard I/O.
Write a C program to swap two numbers using call by address(pointers or reference)
21
method
Unit : III Overview of Data Structure

Sl. Questions
No
1 What is Data Structure? Describe the types of Data Structures.
2 List the area of applications of Data Structure.
3 Differentiate linear and non-linear data structure.
4 What are the operations that can be performed on a stack?

5 Write the steps involved in the insertion and deletion of an element in the stack.

What is a postfix expression? Write the postfix form of the expression:


6
(A + B) * (C - D).

7 Write an algorithm for converting infix expression to prefix expression.

8 Define a Stack. Write a C Program explain the linked list implementation of Stack.

9 Define the queue data structure. List some applications of queue data structure.

10 What are the drawbacks of array implementation of Queue?

11 What are the scenarios in which an element can be inserted into the circular queue?

12 Sketch the diagram of circular queue.


Show the effect of INSERT and DELETE operations on to the Linear queue of size 10. The
Linear queue sequentially contains 10, 20, 30, 40, and 50 where 10 is at front of the queue.
Show diagrammatically the effect of –
13 1. INSERT (12)
2. INSERT (34)
3. DELETE
4. INSERT (56)
How do you compute time complexity and space complexity, what are the various notations
14.
used in them?
Unit : IV General List

Sl. Questions
No
1 Define Linked List Data structure. What are the advantages of Linked List over an array?

2 Write the syntax in C to create a node in the singly linked list.

3 Write algorithm to delete an intermediate node from a Singly Linked List.


Create a Singly Linked List using data fields 10, 20, 30, 40, 50 and show
4
procedure step-by step with the help of diagram from start to end.

5 What are the applications of linked list in dynamic storage management?

6 Define the deletion operation from a linked list.

7 Explain the insertion operation in linked list. How nodes are inserted after a specified node.
What is doubly linked list? What are the advantages of doubly linked list over
8
singly linked list?

What is the circular linked list? Write the C program to insert a node in circular
9
singly list at the beginning.
Compare singly and circular linked list while performing insertion and deletion
10
operations.

11 Write a C program to implement Single linked list using arrays.

12 What is the advantage of linked list over arrays?


Write the Drawbacks of List. Explain the implementation of list with an
13
example.
14 Explain the single linked list operations
Unit : V Trees

Sl. Questions
No
1 Explain the difference between a binary tree and a binary search tree?

2 Explain the difference between Depth-First Search (DFS) and Breadth-First Search (BFS)

3 How do you delete a node from a binary search tree?

4 Explain the steps to perform an pre-order, in-order, post-order traversal in a binary tree?

5 How do you check if a given binary tree is a subtree of another binary tree?

6 What is an AVL tree?

7 What are the types of traversal of binary trees? Explain Its.

8 Can binary search be used for the linked list?

9 Explain the threaded binary trees.

10 Explain preorder, inorder, and postorder tree traversal methods?

11 Explain: (a) Heap Definition (b) forests (c) Complete binary tree

12 What is a self-balanced tree?

You might also like