9.Question on Data Structure
9.Question on Data Structure
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
#include<stdio.h>
void main()
int a[]={4,5,6};
printf(“%d”,a*1+);
A) 4 B) 5 C) 0 D) Garbage value
LINKED LIST:
STACK:
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
A) 20
B) 30
C) 40
D) 50
A) IsFull, IsVoid
B) IsEmpty, Enqueue
C) Push , pop
D) Dequeue, Peek
A) Two, Two
B) One, One
C) Three, Two
D) Two, One
QUEUE:
A) Tree
B) Graph
C) Sets
D) All of these
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)