C Language Interview Questions and Answers for Experienced - 5

Question: 21

What is enum in C?

Enumeration is a data type that consists of named integer constants as a list.

It starts with 0 by default and value is incremented by 1 for the sequential identifiers in the list.

Question: 22

What is variable in C?

C variable is a named location in a memory where a

Program can manipulate the data. This location is used to hold the value of the variables.

C variable might be belonging to any of the data type like int, float and char etc.

The value of the C variable may get change in the program.

Question: 23

What is the default statement used in switch case in C?

Switch case statements are used to execute only specifies case statements based on the switch expression. If switch expression does not match with any case, default statements are executed by the program.

Question: 24

What is the restriction on the declarations and/or definitions of variables?

The restriction on the declarations and/or definitions is that they must come before the executable statements in a block, and hence they appear in the beginning of a block.

Question: 25

When should the functions prototypes be made global?

When the functions can be called from more than one function.

Related Questions