Engineering :: All Aptitude Test ::

Hassan
1.What will be the output of the following C code?
A. a
B. run time error
C. a.0000000
D. a

2.Which of the data types has the size that is variable ?
A. int
B. struct
C. float
D. int

3.What will be the output of the following C code ?
A. PEACH = 3
B. PEACH = 4
C. PEACH = 5
D. PEACH = 3

4.What will be the output of the following C code ?
A. C programming Class by WOW PAK-MCQs
B. C programming Class by\n%s PAK-MCQs
C. C programming Class by %s PAK-MCQs
D. C programming Class by WOW PAK-MCQs

5.In the following code snippet, character pointer str holds a reference to the string ?
A. pak-mcqs.net
B. pak-mcqs.net\0training classes
C. pak-mcqs.nettraining classes
D. pak-mcqs.net

6.What will be the output of the following C code ?
A. a = 5
B. a = 10
C. Compilation error
D. a = 5

7.What will be the output of the following C code ?
A. 2
B. 8
C. 9
D. 2

8.What will be the output of the following C function ?
A. 2
B. 4
C. 8
D. 2

9.What will be the output of the following C code ?
A. 2
B. 4
C. 5
D. 2

10.What will be the output of the following C code ?
A. 2 2
B. 1 1
C. 2 1
D. 2 2

11.enum types are processed by ?
A. Compiler
B. Compiler
C. Linker
D. Compiler

12.What will be the output of the following C code ?
A. pak-mcqsclass
B. pak-mcqs-class
C. classcqs
D. pak-mcqsclass

13.What will be the output of the following C code ?
A. p is 4
B. Compile time error
C. Run time error
D. p is 4

14.Which of the following PHP statement/statements will store 111 in variable num ?
A. Both i) and ii)
B. i), ii), iii) and iv)
C. Only iii)
D. Both i) and ii)

15.What will be the output of the following PHP code ?
A. 3
B. 1+2
C. 1.+.2
D. 3

16.What will be the output of the following PHP code ?
A. 3
B. 1+2
C. Error
D. 3

17.Which is the right way of declaring a variable in PHP ?
A. Only ii)
B. Only iii)
C. ii), iii) and iv)
D. Only ii)

18.What will be the output of the following PHP code ?
A. Error
B. My name is BobBob
C. My name is BobMy name is Bob
D. Error

19.Which of the following PHP statements will output Hello World on the screen ?
A. i) and ii)
B. i), ii) and iii)
C. i), ii), iii) and iv)
D. i) and ii)

20.What will be the output of the following PHP code ?
A. a
B. Error
C. $var
D. a

21.What will be the output of the following PHP code ?
A. 1
B. Error
C. 1234
D. 1

22.What will be the output of the following PHP code ?
A. Error
B. 35 students
C. 35
D. Error

23.A language which has the capability to generate new data types are called ?
A. Extensible
B. Overloaded
C. Encapsulated
D. Extensible

24.Which of the following is called extraction/get from operator ?
A. <<
B. >>
C. <
D. <<

25.Which of the following is called insertion/put to operator ?
A. <<
B. >>
C. >
D. <<

26.Who created C++ ?
A. Bjarne Stroustrup
B. Dennis Ritchie
C. Ken Thompson
D. Bjarne Stroustrup

27.Which of the following escape sequence represents tab ?
A. \t
B. \t\r
C. \b
D. \t

28.Which of the following escape sequence represents carriage return ?
A. \r
B. \n
C. \n\r
D. \r

29.Which function is used to write a single character to console in C++ ?
A. cout.put(ch)
B. cout.putline(ch)
C. write(ch)
D. cout.put(ch)

30.Which function is used to read a single character from the console in C++ ?
A. cin.get(ch)
B. getline(ch)
C. read(ch)
D. cin.get(ch)


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