C Programming :: All Aptitude Test ::

1.Which of the following correctly represents a long double constant?
A. 6.68LF
B. 6.68f
C. 6.68L
D. 6.68LF

2.Which of the structure is incorrect?
A. 1
B. 2
C. 3
D. 1

3.Which of the structure is correct?
A. 1
B. 2
C. 3
D. 1

4.Which of the structure is correct?
A. 1 correct
B. 2 correct
C. 3 correct
D. 1 correct

5.Which of the following is the correct order of evaluation for the below expression?
A. * / % + - =
B. = * / % + -
C. / * % - + =
D. * / % + - =

6.Which of the following correctly shows the hierarchy of arithmetic operations in C?
A. / + * -
B. * - / +
C. + - / *
D. / + * -

7.Which of the following is the correct usage of conditional operators used in C?
A. a>b ? c=30 : c=40;
B. a>b ? c=30;
C. max = a>b ? a>c?a:c:b>c?b:c
D. a>b ? c=30 : c=40;

8.Which of the following is the correct order if calling functions in the below code?
A. f1, f2, f3
B. f3, f2, f1
C. Order may vary from compiler to compiler
D. f1, f2, f3

9.Which of the following are unary operators in C?
A. 1, 2
B. 1, 3
C. 2, 4
D. 1, 2

10.In which order do the following gets evaluated?
A. 2134
B. 1234
C. 4321
D. 2134

11.What will be the output of the program?
A. 1, 2, 3, 1
B. 2, 3, 1, 2
C. -2, 3, 1, 1
D. 1, 2, 3, 1

12.Assuming, integer is 2 byte, What will be the output of the program?
A. Error
B. fff8
C. 0
D. Error

13.What will be the output of the program?
A. z=2
B. z=4
C. z=1
D. z=2

14.What will be the output of the program?
A. 1, 0, 1
B. 1, 1, 1
C. 0, 0, 0
D. 1, 0, 1

15.What will be the output of the program?
A. 1, 1, 1, 1
B. 1, 1, 0, 1
C. 1, 0, 0, 1
D. 1, 1, 1, 1

16.The keyword used to transfer control from a function back to the calling function is?
A. return
B. go back
C. goto
D. return

17.What is the notation for following functions?
A. 1. KR Notation 2. ANSI Notation
B. 1. Pre ANSI C Notation 2. KR Notation
C. 1. ANSI Notation 2. KR Notation
D. 1. KR Notation 2. ANSI Notation

18.How many times the program will print "Pak-MCQs"?
A. Infinite times
B. 32767 times
C. 65535 times
D. Infinite times

19.What will be the output of the program in 16 bit platform (Turbo C under DOS)?
A. 0 (Zero)
B. 1990
C. Garbage value
D. 0 (Zero)

20.What will be the output of the program?
A. 5, 2
B. 10, 4
C. 2, 5
D. 5, 2

21.What will be the output of the program?
A. Infinite loop
B. No output
C. Hi Hello
D. Infinite loop

22.What will be the output of the program?
A. Print 5, 4, 3, 2, 1
B. Print 1, 2, 3, 4, 5
C. Print 5, 4, 3, 2, 1, 0
D. Print 5, 4, 3, 2, 1

23.What will be the output of the program?
A. 0, 1, 2, 0,
B. 0, 1, 0, 2,
C. 1, 1, 2, 0,
D. 0, 1, 2, 0,

24.What will be the output of the program?
A. 12, 12
B. 6, 6
C. 3, 3
D. 12, 12

25.What will be the output of the program?
A. AB
B. BC
C. CD
D. AB

26.What will be the output of the program?
A. 8
B. 9
C. 10
D. 8

27.What will be the output of the program?
A. Print 10
B. Print 20
C. Print 1
D. Print 10

28.What will be the output of the program?
A. 6
B. 1
C. 0
D. 6

29.What will be the output of the program?
A. prints "Pak-Mcqs, C-Program" infinitely
B. prints "C-Program" infinetly
C. prints "C-Program, Pak-Mcqs" infinitely
D. prints "Pak-Mcqs, C-Program" infinitely

30.What will be the output of the program?
A. 12 12
B. No error, No output
C. Error: Compile error
D. 12 12


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