C Programming: MCQ Set – 08

C Programming: MCQ Set – 08

Q71: Unsigned integers occupies

  • (A) Two bytes
  • (B) Four bytes
  • (C) One byte
  • (D) Eight byte

Q72: The earliest calculating devices are

  • (A) Abacus
  • (B) Clock
  • (C) Difference
  • (D) None of these

Q73: Which amongst the following is not a keyword?

  • (A) External
  • (B) Int
  • (C) Float
  • (D) Double

Q74: What would be output of the following program?

#include "stdio.h"
main()
{
printf(“%d%d”, size of (NULL!), size of (“ “));
}
  • (A) 2 1
  • (B) 1 2
  • (C) 2 2
  • (D) 1 1

Q75: What will be the output of following program?

main()
{
int x=15;
printf(“\n%d%d%d”, x!=15, x=20, x<30);
}
  • (A) 0, 20, 1
  • (B) 15, 20, 30
  • (C) 0, 0, 0
  • (D) Error

Q76: What would be the output of following statement

printf (“ % d”, 10 ? 0 ? 5 : 1 : 12);
  • (A) 10
  • (B) 01
  • (C) 11
  • (D) 1

Q77: Which of the following cannot be checked in a switch case statement?

  • (A) Character
  • (B) Integer
  • (C) Float
  • (D) Enum

Q78: The decimal value 0.5 in IEEE single precision floating point representation has

  • (A) fraction bits of 000…000 and exponent value of 0
  • (B) fraction bits of 000…000 and exponent value of -1
  • (C) fraction bits of 100…000 and exponent value of 0
  • (D) no exact representation

Q79: What punctuation is used to signal the beginning and end of code blocks?

  • (A) { }
  • (B) -> and <-
  • (C) BEGIN and END
  • (D) ( and )

Q80: Consider the following pseudocode segment :

K:=0

for i1:= l to n

for i2:= 1 to i1

:

for im:= 1 to im–1

K:= K+1 The value of K after the execution of this code shall be

  • (A) C(n + m – 1, m)
  • (B) C(n – m + 1, m)
  • (C) C(n + m – 1, n)
  • (D) C(n – m + 1, n)

Answer:

QuestionQ71Q72Q73Q74Q75Q76Q77Q78Q79Q80
AnswerBAACADCBBA