C Programming Quiz Questions and Answers

Which of the following is invalid?

Answer :
  • <p>None of the mentioned</p>

Explanation :

All the statements will execute successfully but at the cost of reduced readability.

Which of the following is a User-defined data type?

Answer :
  • all of the mentioned

Explanation :

N/A

Which of the following are unary operators?

Answer :
  • all of the mentioned

Explanation :

N/A

What will be the output of the following C code? void main() { int x = 4; int *p = &x; int *k = p++; int r = p - k; printf("%d", r); }

Answer :
  • 1

Explanation :

N/A

What will be the output of the following C code? int main() { int a = -1, b = 4, c = 1, d; d = ++a && ++b || ++c; printf("%d, %d, %d, %d\n", a, b, c, d); return 0; }

Answer :
  • 0, 4, 2, 1

Explanation :

N/A

What will be the output of the following C code? void main() { int k = 0; double b = k++ + ++k + k--; printf("%d", k); }

Answer :
  • undefined

Explanation :

N/A

What is the output?

Answer :
  • Nothing is printed

Explanation :

N/A

Which of the following data structure is linear type?

Answer :
  • A) Strings
    B) Queue
    C) Lists
    All of the above

Explanation :

N/A

Recursive functions are executed in a?

Answer :
  • Last In First Out Order

Explanation :

N/A