C Language Interview Questions and Answers for Experienced - 6

Question: 26

What is type casting?

Type casting is the process of converting the value of an expression to a particular data type.

Example:       

int  x,y;

C=(float) x/y;

Where x and y are defined as integers. Then the result of x/y is converted into float.

Question: 27

What is meant by Control String in Input/output Statements?

Control String contains the format code characters, specifies the type of data, that the user accessed within the Input/output statements.

Question: 28

What are the main elements of an array declaration?

There are three elements are there called Array name, Type and Size.

Question: 29

How can you return more than one value from a function?

Function return only one value. By using pointer we can return more than one value.

Question: 30

What is a union?

Union is also a group name used to define dissimilar data types.

The Union occupy only the maximum byte of the data type.

If you declare Integer and character, then the union occupy only 2 bytes.

Whereas Structure occupy only 3 bytes.

Related Questions