Computer Science :: All Aptitude Test ::

1.What will be the output of the following C++ code ?
A. 5
B. Garbage value
C. Compile-time error
D. 5

2.What happens if a pointer is deleted twice in a program as shown in the following C++ statements ?
A. Undefined behavior
B. Syntactically incorrect
C. Semantically incorrect
D. Undefined behavior

3.Correct way to define a value 6.28 in a variable ‘pi’ where value cannot be modified ?
A. #define pi 6.28F
B. pi = 6.28F
C. const float pi = 6.28F
D. #define pi 6.28F

4. Minimum and Maximum range of values supported by ‘float’ data type are ?
A. 1.5 * 10-40 to 3.4 * 1038
B. 1.5 * 10-45 to 3.4 * 1030
C. 1.5 * 10-45 to 3.4 * 1038
D. 1.5 * 10-40 to 3.4 * 1038

5.Why does a float variable stop increment at number ‘16777216’ in the following C# code ?
A. Sign and Exponent for ‘16777217’ is same as for ‘16777216’
B. Mantissa is different for ‘16777216’ and ‘16777217’
C. Sign and Exponent for ‘16777217’ is different from ‘16777216’
D. Sign and Exponent for ‘16777217’ is same as for ‘16777216’

6.What will be the output of the following C# code?
A. 0.4000004
B. 0.4000023
C. 0.0400021
D. 0.4000004

7.The Default value of Boolean Data Type is ?
A. True
B. 0
C. False
D. True

8.What will be the output of the following C# code ?
A. 1
B. NaN
C. 0
D. 1

9.Which of the below statements is equivalent to $add += $add ?
A. $add = $add
B. $add = $add +$add
C. $add = $add + 1
D. $add = $add

10.Which statement will output $x on the screen ?
A. echo “\$x”;
B. echo “$$x”;
C. echo “/$x”;
D. echo “\$x”;

11.What will be the output of the following PHP code ?
A. 123
B. 111
C. 000
D. 123

12.What will be the output of the following PHP code ?
A. get
B. true
C. false
D. get

13.What will be the output of the following PHP code ?
A. 5 === 5
B. Error
C. 1
D. 5 === 5

14.Which of the below symbols is a newline character ?
A. \r
B. \n
C. /n
D. \r

15. Who is the father of PHP ?
A. Rasmus Lerdorf
B. Willam Makepiece
C. Drek Kolkevi
D. Rasmus Lerdorf

16.What is the Size of ‘Char’ datatype ?
A. 8 bit
B. 12 bit
C. 16 bit
D. 8 bit

17.What will be the output of the following C# code ?
A. I am a human bein c
B. I am a human being
C. I am a human being c
D. I am a human bein c

18.Which is the String method used to compare two strings with each other ?
A. Compare To()
B. Compare()
C. Copy()
D. Compare To()

19.What will be the output of the following C# code ?
A. PakisPunjab
B. PakistanPunjab
C. Pakistan
D. PakisPunjab

20.What will be the output of the following C# string? (Enter a String : PAKISTAN).
A. PAK-IS-TAN
B. PAKISTAN
C. NATSIKAP
D. PAK-IS-TAN

21.Correct statement about strings are ?
A. A string is created on the stack
B. A string is primitive in nature
C. A string created on heap
D. A string is created on the stack

22.Why strings are of reference type in C#.NET ?
A. To create string on stack
B. To reduce the size of string
C. To overcome problem of stackoverflow
D. To create string on stack

23.The most commonly used input device is ?
A. Mouse
B. Keyboard
C. Scanner
D. Mouse

24.Which keys allows user to enter frequently used operations in a single key stroke ?
A. Function keys
B. Cursor control keys
C. Trackball
D. Function keys

25.Which are used to measure dial rotations ?
A. Potentiometers
B. Volta meter
C. Parameter
D. Potentiometers

26.The device which is used to position the screen cursor is ?
A. Mouse
B. Joystick
C. Data glove
D. Mouse

27.Which is used for detecting mouse motion.
A. Optical sensor
B. Rollers on the bottom of mouse
C. Both A & B
D. Optical sensor

28.Trackball is ?
A. Two-dimensional positioning device
B. Three- dimensional positioning device
C. Pointing device
D. Two-dimensional positioning device

29.Space ball provide degree of freedom ?
A. 10 degree
B. 6 degree
C. 8 degree
D. 10 degree

30.Which is the ball that can be rotated with the fingers or palm of the hand ?
A. Space ball
B. Trackball
C. Both A & B
D. Space ball


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