Identify the application of stack:
a.System stack
b.Recursion
c.Undoing changes in text editor
d. All the above
d. All the above
Operator is placed before the operands: _______:: operands is followed by an operator: Postfix expression
a. Polish notation of the expression
b.Infix expression
a. Polish notation of the expression
main() is a function with no input parameters always
a. False
b.True
a. False
In which real-world scenario is a priority queue most likely to be used?
a. Managing tasks in an operating system.
b. Serving patients in an emergency room based on severity.
c. Storing items in a shopping cart during online shopping.
b. Serving patients in an emergency room based on severity.
A NODE WITH DEPTH ZERO IS DEFINED AS
Root
Identify the INCORRECT option?
a.Hash – Non-primitive and non-linear data structure
b.Tree – Hierarchical data structure
c.Bool – Simple data structure
d.Queue- Dynamic linear data structure
e. Linked lists – Compound Static Linear data structure
e. Linked lists – Compound Static Linear data structure
Which among the following represents a stack?
a.People waiting at a counter, where the action of popping is when someone has been served at the counter
b. A pile of plates at a dinner party
c.People going around a merry-go-round
b. A pile of plates at a dinner party
If a variable is a pointer to a structure, then which of the following operator is used to access data members of the structure through the pointer variable?
a. .
b. &
c. *
d. ->
d. ->
In a circular queue, what is the condition to detect queue fullness?
a. Rear equals Front
b. Rear is one less than Front
c. Rear is one more than Front
d. Front equals Rear modulo (Queue Size - 1)
d. Front equals Rear modulo (Queue Size - 1)
The number of edges from the node to the deepest leaf is called___ of the tree.
Height
In stacks, if the variable ‘top’ is a local variable inside main(), which of the following is the correct way of sending it as a function parameter for stack operation - PUSH?
a. push (stack, &top, item);
b.push (stack, top, item);
c.Either a. or b.
d.None of the above
a. push (stack, &top, item);
Consider these operations on an empty stack: push(3), push(5), pop(), push(10), push(11), pop(), push(100). What will be the stack configuration (first number is top of the stack, last is the bottom)
a. 100,10,3
b. 3,5,10,11,100
c. 3,10,100
d. None of the above
a. 100,10,3
You are given a simple queue with elements 2, 3, 8, 1, 9, 7 where 2 is the front of the queue. The elements are dequeued one-by-one and pushed into a stack, until the queue becomes empty. The elements are again popped from the stack one-by-one and enqueued into the original queue. What is the final arrangement of elements in the queue?
a. 7, 9, 1, 3, 8, 2
b. 8, 1, 9, 7, 2, 3
c. 9, 1, 8, 3, 2, 7
d. 7, 9, 1, 8, 3, 2
d. 7, 9, 1, 8, 3, 2
Match the following:
A. Stacks i. Nodes and links
B. Queues ii. Rear and front
C. Linked list iii. Peek
a. A-iii, B – ii, C – i
b. A-i, B – ii, C – iii
c. A-iii, B – i, C – ii
d. A-i, B – iii, C – ii
a. A-iii, B – ii, C – i
Linked lists are be implemented using __
Structure
Dynamic memory allocation is done in ______
memory
a. Heap
b.Stack memory
c.Code memory
d.Register
a. Heap
isalnum(): _____ :: free(): <stdlib.h> :: scanf(): <stdio.h>
a. <ctype.h>
b.“ctype.h”
c.<stdio.h>
d.“string.h”
a. <ctype.h>
If the memory address of the first element of a floating type array is 2000 (base-10), what is the memory address of the element whose index = 5
a. 2020
b.2012
c.2006
d.2024
a. 2020
Statement A: Comments provide good readability
Statement B: Comments are processed by the compiler
a.Statement A is True, Statement B is True
b. Statement A is True, Statement B is False
c.Statement A is False, Statement B is True
d.Statement A is False, Statement B is False
b. Statement A is True, Statement B is False
IN CIRCULAR LINKED LIST, LAST NODE CONTAINS THE ADDRESS OF _ NODE
FIRST
For the given infix expression, identify the correct reverse polish notation of expression
Input: A + B * C + D
Output: __________
a. ABC*+D+
b.BC*D+A+
c.AB+CD+*
d.BC*DA++
a. ABC*+D+
printf() and scanf() are in-bulit functions which do NOT have return value.
a. True
b. False
b. False
Queue: LILO :: Stack : _______
a.LIFO
b.FILO
c. Both a. and b.
d.None of the above
c. Both a. and b.
Statement A: Infix is converted to prefix expression
Statement B: Infix is human readable, prefix expression is computer readable
a. Statement A is Correct and Statement B is the reason
b.Statement A is Incorrect and Statement B is the reason
c.Statement A is Correct but Statement B is not the reason
a. Statement A is Correct and Statement B is the reason
In a singly linked list, each node typically contains two fields: a data field to store the information and a ____ field that holds the address of the next node in the sequence
ADDRESS