Compare array with pointer
Compare array with pointer. The following declarations are NOT the same:
char *p; char a[20];
The first declaration allocates memory for a pointer; the second allocates memory for 20 characters.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.
|
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....
#pragma statementsThe #pragma Directives are used to turn ON or OFF certain features. They vary from compiler to compiler. Examples of pragmas are:.....