VOOZH about

URL: https://www.geeksforgeeks.org/quizzes/data-types-gq/

⇱ Quiz about C Data Types


Last Updated :
Discuss
Comments

Question 1

Predict the output of following program. Assume that the numbers are stored in 2's complement form.
  • same
  • not same

Question 2

Which of the following is not a valid declaration in C?
  • 3 and 4
  • 2
  • 1
  • All are valid

Question 3

Predict the output
  • Temperature in Fahrenheit is 41.00
  • Temperature in Fahrenheit is 37.00
  • Temperature in Fahrenheit is 0.00
  • Compiler Error

Question 4

Predict the output of following C program

  • Compiler Error

  • 12

  • 10

  • Empty

Question 5

In C, sizes of an integer and a pointer must be same.
  • True
  • False

Question 6

Output?
  • 0
  • Compiler Error
  • Garbage Value

Question 7

Assume that the size of char is 1 byte and negatives are stored in 2's complement form
  • 135
  • +INF
  • -121
  • -8

Question 8

  • Yes
  • No
  • Compiler Error
  • Runtime Error

Question 9

Output of following program?
  • ELSE IF
  • IF
  • ELSE

Question 10

Suppose n and p are unsigned int variables in a C program. We wish to set p to nC3. If n is large, which of the following statements is most likely to set p correctly?

  • p = n * (n-1) * (n-2) / 6;

  • p = n * (n-1) / 2 * (n-2) / 3;

  • p = n * (n-1) / 3 * (n-2) / 2;

  • p = n * (n-1) * (n-2) / 6.0;

Tags:

There are 14 questions to complete.

Take a part in the ongoing discussion