Q-1 What is NULL pointer?
A null pointer does not point to any object.
NULL and 0 are interchangeable in pointer contexts.
Usage of NULL should be considered a gentle reminder that a pointer is involved. It is only in pointer contexts that NULL and 0 are equivalent.
NULL should not be used when another kind of 0 is required.
NULL and 0 are interchangeable in pointer contexts.
Usage of NULL should be considered a gentle reminder that a pointer is involved. It is only in pointer contexts that NULL and 0 are equivalent.
NULL should not be used when another kind of 0 is required.
Q-2 Define pointer in C.
A pointer is an address location of another variable.
It is a value that designates the address or memory location of some other value (usually value of a variable).
The value of a variable can be accessed by a pointer which points to that variable.
To do so, the reference operator (&) is pre-appended to the variable that holds the value.
A pointer can hold any data type, including functions.
It is a value that designates the address or memory location of some other value (usually value of a variable).
The value of a variable can be accessed by a pointer which points to that variable.
To do so, the reference operator (&) is pre-appended to the variable that holds the value.
A pointer can hold any data type, including functions.
Q-3 Define function pointer?
The function pointer is the pointer which accesses the address of a function.
The running program occupies some memory space.
Both the executable compiled program code and as well as user variables works on function pointers.
In the C, each function has an address in a code segment.
The running program occupies some memory space.
Both the executable compiled program code and as well as user variables works on function pointers.
In the C, each function has an address in a code segment.
Q-4 What is volatile variable?
Volatile variables are those variables which alters the default way of the program.
The variable which do not change while compiling but are changeable during execution.
The variable which do not change while compiling but are changeable during execution.
Q-5 Difference between global and static variable?
Static variables persist throughout the scope, but the lifespan is not throughout the program.
Global variables persist throughout the scope of base blocks of memory that is their lifespan is throughout the program.
Global variables persist throughout the scope of base blocks of memory that is their lifespan is throughout the program.
Q-6 What are the files automatically opened when C file is executed?
Static variables persist throughout the scope, but the lifespan is not throughout the program.
Global variables persist throughout the scope of base blocks of memory that is their lifespan is throughout the program.
Global variables persist throughout the scope of base blocks of memory that is their lifespan is throughout the program.
Q-7 Compare between array and pointer.
Array can allocate variables but cannot reallocate those variable if required. Whereas the pointer was assigned to allocate variables and they can also relocate and also are resizable.
Q-8 Where the function pointers can be used?
The function pointers can be used when if/switch statements are present,in late binding(variation tables) and to implement call backs activities.
Q-9 Define function prototype?
The function prototype is the prototype which depends on the following:
a. No. of input types
b. No. of outputs which are to be returned
a. No. of input types
b. No. of outputs which are to be returned
Q-10 What do you mean by #include?
In C, the hash function # tells the compiler that a statement should be sent to the C preprocessor.
The include looks after the new files and replace the contents of those files and stdio.h will be valid only for the printf, scanf functions.
The include looks after the new files and replace the contents of those files and stdio.h will be valid only for the printf, scanf functions.

0 comments:
Post a Comment