ARRAY:
1.Which of the following is a valid property of arrays in most
programming languages?
A) Arrays allow random (direct) access to elements
B) Array elements are stored contiguously in memory
C) Arrays can be used to implement data structures like stack and
queue
D) All of the above
2.An array ARR uses zero-based indexing and has a base address of
100. Each element of the array occupies 4 bytes. What is the memory
address of ARR[5] ?
A) 104
B) 120
C) 124
D) 116
3.What is the output ?
#include<stdio.h>
void main()
int a[]={4,5,6};
printf(“%d”,a*1+);
A) 4 B) 5 C) 0 D) Garbage value
4.Which of the following methods can be used to determine the
length (number of elements) of a statically declared array in C?
A) length(array)
B) sizeof(array)
C) array.length()
D) getLength(array)
LINKED LIST:
5.Which of the following is a valid property of a linked list?
A) Supports sequential access
B) Nodes are created dynamically
C) Last node contains a null character \0
D) Both A and B
STACK:
6.Which of the following is a common application of the stack data
structure?
A) Maintaining browsing history in a web browser
B) Implementing recursion in programming languages
C) Converting infix expressions to postfix
D) Undo and redo functionality in text editors like Notepad
E) All of the above
7.What is the postfix expression for the infix expression: A*B + (C-D)
A) A B C D * + -
B) A B * C D - +
C) A + B * C D -
D) * + - A B C D
8.Consider the following stack operations performed on an initially
empty stack:
PUSH(10) ,PUSH(20) ,PUSH(30) ,POP() ,PUSH(40) ,PUSH(50) ,POP()
What is the value at the top of the stack now?
A) 20
B) 30
C) 40
D) 50
9.Which is a basic operation in stack?
A) IsFull, IsVoid
B) IsEmpty, Enqueue
C) Push , pop
D) Dequeue, Peek
10. ______ stacks can be used to implement a queue, and a ______
queue can be used to implement a stack.
A) Two, Two
B) One, One
C) Three, Two
D) Two, One
QUEUE:
11.Which of the following is a non-linear data structure?
A) Tree
B) Graph
C) Sets
D) All of these
12.Which of the following is an application of queues in computer
systems?
A) Synchronization of clock in a PC
B) Handling interrupts in Operating Systems
C) Disk scheduling and CPU scheduling
D) All of the above
13.Which of the following correctly represents the order of operations
in a queue and a stack, respectively?
A) Queue – FIFO (First In First Out), Stack – LIFO (Last In First Out)
B) Queue – LILO (Last In Last Out), Stack – FILO (First In Last Out)
C) Queue – LIFO (Last In First Out), Stack – FIFO (First In First Out)
D) Queue – FILO (First In Last Out), Stack – LILO (Last In Last Out)
14.What is a pointer in C language?
A) A variable that stores the address of another variable
B) A function that returns a memory location
C) A data type that can store only integers
D) A keyword used to create variables
15.Which of the following is not a type of queue?
A) Simple (Linear) Queue
B) Circular Queue
C) Priority Queue
D) Doubly Linked Queue
16. A queue is used to implement which of the following algorithms?
A) Breadth First Search (BFS)
B) Radix Sort
C) Both A and B
D) None of these