Total Pageviews

Sunday, 2 July 2023

C programming and Data Structures Questions

1. Introduction to C Programming

1. Explain the various Operators used in c programming.

2.. Define Array with syntax. Write a C program to implement matrix multiplication using multidimensional array.

3. Explain the difference between while and do-while loop in detail.

4.  What is the use of decision statements explain about switch statement with suitable example.

2. Functions 

1.Define Function with example.

2. What is meant by call by reference. explain with example.

3. Explain the basic string functions with suitable example.

4.What is the difference between Structure and Union.

5. Write short notes on storage classes.

3.  Data Structures (Stack and Queue)

1. What is a Stack? Explain operations of stack with example?

    • Definition of Stack
    • Operations of Stack: PUSH and POP
• Example
2. Write the algorithm for converting infix expression to postfix expression?
    • Definition of Expression
    • Types of expression
    • Algorithm for infix to postfix expression
    • Example
3. What is a Queue? Explain its operation with example?
• Definition of Queue
    • Operations of Queue: insert and remove
    • Example
4. Explain the applications of stack?
    • Evaluating arithmetic expression
    • Balancing the symbols
    • Function calls

5. Write infix to postfix conversion algorithm and evaluate the expression ( 5 + 3 ) * ( 8 – 2 ) using stack.

6. The prefix form of A-B/ (C * D E) is? (2 Marks)

6. Define circular linked list .( 2 Marks)

7. What is the value of the postfix expression 6 3 2 4 + – *?    ( 2 Marks)

4.Data Structures ( Linked List)

1. Illustrate the various operations of single linked list in detail

2. Write an algorithm for inserting and deleting an element from doubly linked list?
    • Introduction to Doubly linked list
    • Operations: insertion and deletion with algorithm

3. Explain linear linked implementation of Stack ?


5. Data Structures ( Trees and Graphs)

1. What is a binary tree? Explain binary tree traversal in “c”
·         Definition of binary tree
·         Traversals
·         Inorder traversal
·         Preorder traversal
·         Postorder traversal

2. Construct a binary tree to satisfy the following orders:
·         Inorder : D B F E A G C L J H K
·         Postorder : D F E B G L J K H C A

3. Explain Depth First Search  traversal?

·         Depth first traversal
·         Examples
4. 
 Explain Breadth first Search traversal?

        Breadth first traversal

          Examples

5. What is binary search. Explain with an example.

6. Explain insertion sort with an example.

No comments:

Post a Comment