C Language Interview Questions and Answers for Freshers - 5

Question: 21

What are the different types of variables in C?

There are three types of variables in C

Local variable

Global variable

Environment variable

Question: 22

What is environment variable in C?

Environment variable is a variable that will be available for all C applications and C programs.

Once environment variables are exported, we can access them from anywhere in a C program without declaring and initializing in an application or C program.

 

Question: 23

What is global variable in C?

The variables which are having scope/life throughout the program are called global variables.

A global variable is defined outside the main functions. So, this variable is visible to main function and all other sub functions.

Question: 24

What is local variable in C?

The variables which are having scope/life only within the function are called local variables.

These variables are declared within the function and can’t be accessed outside the function.

Question: 25

What are the types of I/O statements available in C?

There are two types of I/O statements available in C:

 Formatted I/O Statements 

 Unformatted I/O Statements

Related Questions