C Language Interview Questions and Answers - 6

Question: 26

How do you close the file?

The file is closed by the statement fclose(file_pointer);

Question: 27

A program can contain more return statements?

Yes. The program can contain any number of return statements.

Question: 28

What are all loop controls statements in C?

Loop control statements in C are used to perform looping operations until the given condition is true. Control comes out of the loop statements once condition becomes false.

There are 3 types of loop control statements in C language. They are.

for

while

do-while

Question: 29

What is meant by protocol?

Protocol is nothing but a set of rules to be followed by a programmer.

Question: 30

What is the use of “goto” statement?

goto statement is used to transfer the normal flow of a program to the specified in the program. Below is the syntax for goto statement in C.

{

……..

goto label;

……

…….

LABEL :

statements;

}

Related Questions