Professional Documents
Culture Documents
C Interview Questions and Answers: What Is The Heap?
C Interview Questions and Answers: What Is The Heap?
[C Frequently
strings passed).
- Any user-defined name can also be used as parameters for main( ) instead of argc
and argv
int i = 0;
int *ip01 = & i;
int **ip02 = & ip01;
int ***ip03 = & ip02;
int ****ip04 = & ip03;
int *****ip05 = & ip04;
int ******ip06 = & ip05;
int *******ip07 = & ip06;
int ********ip08 = & ip07;
int *********ip09 = & ip08;
int **********ip10 = & ip09;
int ***********ip11 = & ip10;
int ************ip12 = & ip11;
************ip12 = 1; /* i = 1 */
The ANSI C standard says all compilers must handle at least 12 levels. Your
compiler might support more.
compiler will enforce that promise as best it can by not enabling the programmer to
write code which modifies a variable that has been declared const.
A const pointer, or more correctly, a pointer to const, is a pointer which points to
data that is const (constant, or unchanging). A pointer to const is declared by
putting the word const at the beginning of the pointer declaration. This declares a
pointer which points to data that cant be modified. The pointer itself can be
modified. The following example illustrates some legal and illegal uses of a const
pointer:
const char *str = hello;
char c = *str /* legal */
str++; /* legal */
*str = a; /* illegal */
str[1] = b; /* illegal */