C Language

21. In c language '\a' used for:

  1. Form feed
  2. Line Brack
  3. Alarm
  4. None of these

Correct answer: (C)
Alarm

22. The Arithmetic operator '%' can be used with:

  1. int
  2. float
  3. double
  4. void

Correct answer: (A)
int

23. '%d' is the conversion letter for:

  1. char
  2. int
  3. float
  4. double

Correct answer: (B)
int

24. printf("%c", 65); Out of this line is:

  1. 65
  2. A
  3. Both
  4. None of these

Correct answer: (B)
A

25. Binary operator needs:

  1. One operand
  2. Two operand
  3. Three operand
  4. None of these

Correct answer: (B)
Two operand

26. Which is the symbol for AND operator:

  1. ||
  2. &&
  3. $$
  4. None of these

Correct answer: (B)
&&

27. printf("0 && 1 = %d\n", 0 && 1); Out of this line is:

  1. 0 && 1 = 0
  2. 0 && 1 = 1
  3. 0 && 1 = 2
  4. 0 && 1 = 3

Correct answer: (A)
0 && 1 = 0

28. int x=10; printf("%d",x++); Output is:

  1. 10
  2. 11
  3. 12
  4. None of these

Correct answer: (A)
10

29. >> operator is used for:

  1. Right Shift
  2. Left Shift
  3. Both
  4. None of these

Correct answer: (A)
Right Shift

30. char x=10; printf("%d",~x); Output is:

  1. 10
  2. -10
  3. -11
  4. None of these

Correct answer: (C)
-11

Page 3 of 8