C Interviews
C Interview
If a variable is declared with a register storage class,it is known as register variable.The register variable is stored in the cpu register instead of main memory.Frequently used variables are declared as register variable as it?s access time is faster.
A static function is a function whose scope is limited to the current source file. Scope refers to the visibility of a function or variable. If the function or variable is visible outside of the current source file, it is said to have global, or external, scope. If the function or variable is not visible outside of the current source file, it is said to have local, or static, scope
Huge pointer is 32bit long containing segment address and offset address. Huge pointers are normalized pointers so for any given memory address there is only one possible huge address segment : offset pair. Huge pointer arithmetic is doe with calls to special subroutines so its arithmetic slower than any other pointers.
The void pointer is useful because it is a generic pointer that any pointer can be cast into and back again without loss of information.
In C void* acts as a generic pointer. When other pointer types are assigned to generic pointer,conversions are applied automatically (implicit conversion).
If a pointer variable points another pointer value. Such a situation is known as a pointer to a pointer. Example : int *p1, **p2, v=10;P1=&v; p2=&p1; Here p2 is a pointer to a pointer.
Linker converts an object code into an executable code by linking together the necessary built in functions. The form and place of declaration where the variable is declared in a program determine the linkage of variable.
A large program is subdivided into a number of smaller programs or subprograms. Each subprogram specifies one or more actions to be performed for the larger program. Such sub programs are called functions.
An argument is an entity used to pass data from the calling to a called function.
The functions that are predefined and supplied along with the compiler are known as built in functions. They are also known as library functions.