Computer Science :: All Aptitude Test ::

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

24.The first widely-used high level language developed in 1957 ?
A. C
B. Java
C. FORTRAN
D. C

25.First statement in a FORTRAN code is ?
A. Include statement
B. Import statement
C. Program statement
D. Include statement

26.A FORTRAN is not ?
A. System supported
B. Source supported
C. Case Sensitive
D. System supported

27.The delimiter in a FORTRAN code ?
A. Semicolon
B. Blank space
C. Colon
D. Semicolon

28.A program that reads the source code and converts it to a form usable by the computer ?
A. Interpreter
B. Compiler
C. Linker
D. Interpreter

29.A valid variable declaration in FORTRAN is ?
A. real :: Celsius
B. real Celsius;
C. Celsius real;
D. real :: Celsius

30.In FORTRAN, the declarations of variables can be modified using which parameter ?
A. kind
B. make
C. select
D. kind


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