Computer Science :: All Aptitude Test ::

1.The number of full and half-adders required to add 16-bit numbers is:
A. 8 half-adders, 8 full-adders
B. 1 half-adder, 15 full-adders
C. 16 half-adders, 0 full-adders
D. 8 half-adders, 8 full-adders

2.The time required for a pulse to decrease from 90 to 10 per cent of its maximum value is called:
A. Rise time
B. Decay time
C. Binary level transition period
D. Rise time

3.In a stack, if a user tries to remove an element from empty stack it is called :
A. Underflow
B. Empty collection
C. Overflow
D. Underflow

4.Entries in a stack are "ordered". What is the meaning of this statement?
A. A collection of stacks is sortable
B. Stack entries may be compared with the '<' operation
C. The entries are stored in a linked list
D. A collection of stacks is sortable

5.What is the value of the postfix expression 6 3 2 4 + – *:
A. Something between -5 and -15
B. Something between 5 and -5
C. Something between 15 and 100
D. Something between -5 and -15

6. If there's no base criteria in a recursive program, the program will:
A. not be executed.
B. execute infinitely.
C. execute until all conditions match.
D. not be executed.

7.The depth of complete binary tree is given by:
A. Dn = n log2n
B. Dn = n log2n +1
C. Dn = log2n
D. Dn = n log2n

8.One can convert a binary tree to its mirror image by traversing it in:
A. Inorder
B. Preorder
C. Postorder
D. Inorder

9.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. Dequeue

10.Consider the following definition in c programming language:
A. ptr = (NODE*)malloc(sizeof(NODE*));
B. ptr = (NODE*)malloc(sizeof(NODE));
C. ptr = (NODE*)malloc(NODE);
D. ptr = (NODE*)malloc(sizeof(NODE*));

11.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 previous node xor pointer to next node

12. 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. Undo operation in a text editor

13.Array implementation of Stack is not dynamic, which of the following statements supports this argument?
A. space allocation for array is fixed and cannot be changed during run-time
B. user unable to give the input for stack operations
C. a runtime exception halts execution
D. space allocation for array is fixed and cannot be changed during run-time

14.Which of the following data structures can be used for parentheses matching?
A. n-ary tree
B. queue
C. priority queue
D. n-ary tree

15.In cae of insertion into a linked queue, a node borrowed from the __________ list is inserted in the queue.
A. AVAIL
B. FRONT
C. REAR
D. AVAIL

16.Consider the following pseudocode that uses a stack. What is output for input "letsfindc"?
A. letsfindcletsfindc
B. cdnifstel
C. letsfindc
D. letsfindcletsfindc

17.In which data structure element is inserted at one end called Rear and deleted at other end called Front:
A. Queue
B. Stack
C. Both
D. Queue

18.Stack can be implemented using _________ and ________ ?
A. Array and Binary Tree
B. Linked List and Graph
C. Array and Linked List
D. Array and Binary Tree

19.Stack in Data Structure is ___________?
A. LILO
B. FIFO
C. None of these
D. LILO

20.Pick out the odd one which is not related to stacks:
A. LIFO list
B. FIFO list
C. Push down lists
D. LIFO list

21.Which of the following is an application of stack?
A. finding factorial
B. tower of Hanoi
C. infix to postfix
D. finding factorial

22.Which data structure is used in breadth first search of a graph to hold nodes?
A. Stack
B. Queue
C. Array
D. Stack

23.In a queue, the initial values of front pointer f rare pointer r should be …….. and ……….. respectively:
A. 0 and 1
B. 0 and -1
C. -1 and 0
D. 0 and 1

24.In a circular queue the value of r will be:
A. r=r+1
B. r=(r+1)% [QUEUE_SIZE – 1]
C. r=(r+1)% QUEUE_SIZE
D. r=r+1

25.Which of the following statement is true?
A. i-only
B. ii-only
C. None of the above
D. i-only

26.What will be the value of top, if there is a size of stack STACK_SIZE is 5:
A. 4
B. 5
C. 6
D. 4

27.………… is not the operation that can be performed on queue:
A. Insertion
B. Deletion
C. Retrieval
D. Insertion

28.Which of the following is not the type of queue?
A. Ordinary queue
B. Single ended queue
C. Circular queue
D. Ordinary queue

29.When does top value of the stack changes?
A. Before deletion
B. While checking underflow
C. At the time of deletion
D. Before deletion

30.In a priority queue, insertion and deletion takes place at ………………?
A. front, rear end
B. only at rear end
C. only at front end
D. front, rear end


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