C Language Interview Questions and Answers for Freshers - 7

Question: 31

What is the difference between Library Function and User-Defined Function?

Library functions are the functions which are already written in some standard libraries.

User defined function means the function which are written by the user to perform particular task.

Question: 32

What is a Function?

A  Function is a set of instructions used to perform a specified task which Repeatedly occurs in the main program.

Question: 33

What is the difference between declaration and definition of a function?

Like variables, declaration of a function only identifies the return type of the function and the type of format arguments. The declaration of a function is usually referred as a function prototype.

On the other hand, definition of a function contains the statements to accomplish the intended task. Like variables functions also have an address associated with its name.

Question: 34

Can we make our own library of functions?

Yes. Different compilers provide different utilities to add/delete/modify functions in the standard library.

For example Turbo C/C++ compilers provide a utility called TLIB.EXE. Using this utility we can also develop a completely new library.

Question: 35

What is the use of sizeof() functions of?

sizeof() function is used to find the memory space allocated for each data type in C.

Related Questions