GAT Subject :: All Aptitude Test ::

Hassan
1.What are the disadvantages of arrays ?
A. Data structure like queue or stack cannot be implemented
B. There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size
C. Index value of an array can be negative
D. Data structure like queue or stack cannot be implemented

2.Assuming int is of 4 bytes, what is the size of int arr[15]; ?
A. 15
B. 19
C. 11
D. 15

3.In general, the index of the first element in an array is ?
A. 0
B. -1
C. 2
D. 0

4.Elements in an array are accessed ?
A. Randomly
B. Sequentially
C. Exponentially
D. Randomly

5.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

6.Pushing an element into stack already having five elements and stack size of 5, then stack becomes ?
A. Overflow
B. Crash
C. Underflow
D. Overflow

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

8.Which of the following applications may use a stack ?
A. A parentheses balancing program
B. Tracking of local variables at run time
C. Compiler Syntax Analyzer
D. A parentheses balancing program

9.Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
A. 1
B. 2
C. 3
D. 1

10.Consider the usual algorithm for determining whether a sequence of parentheses is balanced.
A. 1
B. 2
C. 3
D. 1

11.What is the value of the postfix expression 6 3 2 4 + – * ?
A. 1
B. 40
C. 74
D. 1

12.Here is an infix expression: 4 + 3*(6*3-12). Suppose that we are using the usual stack algorithm to convert the expression from infix to postfix notation.
A. 1
B. 2
C. 3
D. 1

13.What data structure would you mostly likely see in a non recursive implementation of a recursive algorithm ?
A. Linked List
B. Stack
C. Queue
D. Linked List

14.The process of accessing data stored in a serial access memory is similar to manipulating data on a ?
A. Heap
B. Binary Tree
C. Array
D. Heap

15.The postfix form of A*B+C/D is ?
A. *AB/CD+
B. AB*CD/+
C. A*BC+/D
D. *AB/CD+

16.Which data structure is needed to convert infix notation to postfix notation?
A. Branch
B. Tree
C. Queue
D. Branch

17.The prefix form of A-B/ (C * D ^ E) is ?
A. -/*^ACBDE
B. -ABCD*^DE
C. -A/B*C^DE
D. -/*^ACBDE

18.What is the result of the following operation ?
A. X
B. X+S
C. S
D. X

19.The prefix form of an infix expression (p + q) – (r * t) is ?
A. + pq – *rt
B. – +pqr * t
C. – +pq * rt
D. + pq – *rt

20.Which data structure is used for implementing recursion ?
A. Queue
B. Stack
C. Array
D. Queue

21.Which of the following bits is the negation of the bits “010110” ?
A. 111001
B. 001001
C. 101001
D. 111001

22.Which of the following option is suitable, if A is “10110110”, B is”11100000”and C is”10100000” ?
A. C=A or B
B. C=~A
C. C=~B
D. C=A or B

23.How many bits string of length 4 are possible such that they contains 2 ones and 2 zeroes ?
A. 4
B. 2
C. 5
D. 4

24.If a bit string contains {0, 1} only, having length 5 has no more than 2 ones in it. Then how many such bit strings are possible ?
A. 14
B. 12
C. 15
D. 14

25.If A is “001100” and B is “010101” then A (Ex-or) B is ?
A. 000000
B. 111111
C. 001101
D. 000000

26.The Ex-nor of this string “01010101”with “11111111” is ?
A. 10101010
B. 00110100
C. 01010101
D. 10101010

27.The one’s complement of this string “01010100” is ?
A. 10101010
B. 00110101
C. 10101011
D. 10101010

28.The 2’s complement of this string “01010100” is ?
A. 10101010
B. 00110100
C. 10101100
D. 10101010

29. If in a bits string of {0,1} ,of length 4,such that no two ones are together. Then total number of such possible strings are ?
A. 1
B. 5
C. 7
D. 1

30.Let A : “010101” ,B=? ,If { A (Ex-or) B } is a resultant string of all ones then which of the following statement regarding B is correct ?
A. B is negation of A
B. B is 101010
C. {A (and) B} is a resultant string having all zeroes
D. B is negation of A


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