C Language Interview Questions and Answers - 5

Question: 21

What is the difference between scanf() and gets() function?

In scanf() when there is a blank was typed, the scanf()  assumes that it is an end.

gets() assumes the enter key as end.

Question: 22

Specify any five syntax error messages.

  1. Missing semicolon
  2. Missing braces
  3. Missing quotes
  4. Improper comment characters
  5. Undeclared variables

Question: 23

Is it possible to place a return statement anywhere in ‘C’ program?

Yes .The return statement can occur anywhere.

Question: 24

What will happen when you access the array more than its dimension?

When you access the array more than its dimensions some garbage value is stored in the array.

Question: 25

What is the difference between a and “a”?

Where a is a character constant and “a” is a string.

Related Questions