C Language Interview Questions and Answers - 2

Question: 6

What is an operator and Operand?

An operator is a symbol that specifies an operation to be performed on Operands.

The data items that operators act upon are called operands.

Question: 7

What is the difference between assembler, compiler and interpreter?

Assembler is a program that converts assembly level language (low level language) into machine language.

Compiler compiles entire C source code into machine code.

Whereas, interpreters converts source code into intermediate code and then this intermediate code is executed line by line.

Question: 8

What is header file in C language?

Header file is a file that contains functions declaration and macro definition for C in built library functions.

All C standard library functions are declared in many header files which are saved as file_name.h.

We are including these header files in our C program using “#include” command to make use of the functions those are declared in the header files.

When we include header files in our C program using “#include” command, all c code of the header files are included in C program. Then, this C program is compiled by compiler and executed.

 

Question: 9

What is keyword in C?

Keywords are pre-defined words in a C compiler. Each keyword is meant to perform a specific function in a C program.

Since keywords are referred names for compiler, they can’t be used as variable name.

Question: 10

List out some keywords available in C language?

Below are some of keywords that C language offers.

auto, double, int, struct, break, else, long, switch, case, enum, register, typedef, char, extern, return, union, const, float, short, unsigned, continue, for, signed, void, default, goto, sizeof, volatile, do, if, static, while.

Related Questions