Stack Operations - Section 2 Multiple Questions and Answers.




26.One can convert a binary tree to its mirror image by traversing it in:
A. Inorder
B. Preorder
C. Postorder
D. None of the above

27.A data structure in which elements can be inserted or deleted at/from both the ends but not in the middle is?
A. Dequeue
B. Circular queue
C. Queue
D. Priority queue

28.Consider the following definition in c programming language:

struct node
{
    int data;
    struct node * next;
}
typedef struct node NODE;
NODE *ptr;

Which of the following c code is used to create new node?

A. ptr = (NODE*)malloc(sizeof(NODE*));
B. ptr = (NODE*)malloc(sizeof(NODE));
C. ptr = (NODE*)malloc(NODE);
D. ptr = (NODE)malloc(sizeof(NODE));

29.How do you calculate the pointer difference in a memory efficient double linked list?
A. pointer to previous node xor pointer to next node
B. head xor tail
C. pointer to previous node – pointer to next node
D. pointer to next node – pointer to previous node

30. Which of the following application makes use of a circular linked list?
A. Undo operation in a text editor
B. Recursive function calls
C. Implement Hash Tables
D. Allocating CPU to resources

«



Date to Date Current Affairs 2022

PakMCQs.net

Quick Links

GAT Subject



   Computer Science    English Mcqs    Agriculture    

Engineering



   Computer Science    Civil Engineering    

Technical



   Networking    Electronics    Database    

Past Papers



   Model Papers    FPSC Papers