GAT Subject :: All Aptitude Test ::

Hassan
1.Index of arrays in C programming language starts from?
A. 0
B. 1
C. either 0 or 1
D. 0

2.Arrays are best data structures
A. for relatively permanent collections of data
B. for the size of the structure and the data in the structure are constantly changing
C. for both of above situation
D. for relatively permanent collections of data

3.A …………………… does not keep track of address of every element in the list.
A. Stack
B. String
C. Linear array
D. Stack

4.Each array declaration need not give, implicitly or explicitly, the information about:
A. the name of array
B. the data type of array
C. the first data from the set to be stored
D. the name of array

5.The memory address of the first element of an array is called:
A. floor address
B. foundation address
C. first address
D. floor address

6.Two dimensional arrays are also called:
A. tables arrays
B. matrix arrays
C. both of above
D. tables arrays

7.What is right way to Initialize array?
A. int num[6] = { 2, 4, 12, 5, 45, 5 };
B. int n{} = { 2, 4, 12, 5, 45, 5 };
C. int n{6} = { 2, 4, 12 };
D. int num[6] = { 2, 4, 12, 5, 45, 5 };

8.An array elements are always stored in ________ memory locations.
A. Sequential
B. Random
C. Sequential and Random
D. Sequential

9.Size of the array need not be specified, when:
A. Initialization is a part of definition
B. It is a declaratrion
C. It is a formal parameter
D. Initialization is a part of definition

10.Array passed as an argument to a function is interpreted as:
A. Address of the array.
B. Values of the first elements of the array.
C. Address of the first element of the array.
D. Address of the array.

11.Which of the following correctly accesses the seventh element stored in arr, an array with 100 elements?
A. arr[6]
B. arr[7]
C. arr{6}
D. arr[6]

12.The smallest element of an array’s index is called its:
A. lower bound
B. upper bound
C. range
D. lower bound

13.The postfix form of the expression: (A+B)∗(C∗D-E)∗F/G is:
A. AB+CD ∗ E−FG/∗∗
B. AB+CD ∗ E−F∗∗G/
C. AB+CD ∗ E−∗F∗G/
D. AB+CD ∗ E−FG/∗∗

14.What is the postfix form of the following prefix expression -A/B*C$DE
A. ABCDE$*/-
B. A-BCDE$*/-
C. ABC$ED*/-
D. ABCDE$*/-

15.The data structure required to check whether an expression contains balanced parenthesis is:
A. Queue
B. Tree
C. Stack
D. Queue

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

17. If memory for the run-time stack is only 150 cells(words), how big can N be in Factorial(N) before encounterring stack overflow?
A. 24
B. 12
C. 26
D. 24

18.Using Pop (S1,Item) ,Push(S1, Item), Getlist(Item), Pop(S2,Item), and the variables S1,S2(stacks with Top1 and Top2) and Item and given the input file: A,B,C,D,E,F Which stack are possible?
A. All possible stacks with A,B,C,D,E and F
B. No possible stacks with A,B,C,D,E and F
C. Exact and only those stacks which can be produced with S1 alone
D. All possible stacks with A,B,C,D,E and F

19. What is the result of the following operation Top (Push (S, X))
A. X
B. Null
C. S
D. X

20.The prefix form of an infix expression p + q - r * t is?
A. + pq - *rt
B. - +pqr * t
C. - +pq * rt
D. + pq - *rt

21. The result of evaluating the postfix expression 5, 4, 6, +, *, 4, 9, 3, /, +, * is?
A. 600
B. 350
C. 650
D. 600

22.Convert the following infix expressions into its equivalent postfix expressions (A + B â‹€D)/(E - F)+G:
A. (A B D â‹€ + E F - / G +)
B. (A B D +â‹€ E F - / G +)
C. (A B D â‹€ + E F/- G +)
D. (A B D â‹€ + E F - / G +)

23.Convert the following Infix expression to Postfix form using a stack:
A. xyz*+pq*r+s+*
B. xyz*+pq*r+s*+
C. xyz+*pq*r+s*+
D. xyz*+pq*r+s+*

24.3x8 decoder will have:
A. 3 inputs
B. 4 inputs
C. 5 inputs
D. 3 inputs

25. In which of the following gates, the output is 1, if and only if at least one input is 1?
A. NOR
B. AND
C. OR
D. NOR

26.The time required for a gate or inverter to change its state is called:
A. Rise time
B. Decay time
C. Propagation time
D. Rise time

27. The time required for a pulse to change from 10 to 90 percent of its maximum value is called:
A. Rise time
B. Decay time
C. Propagation time
D. Rise time

28.The maximum frequency at which digital data can be applied to gate is called:
A. Binary level transaction period
B. Propagation speed
C. Charging time
D. Binary level transaction period

29.What is the minimum number of two-input NAND gates used to perform the function of two input OR gate ?
A. one
B. two
C. three
D. one

30.Odd parity of word can be conveniently tested by:
A. OR gate
B. AND gate
C. NOR gate
D. OR gate


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