c basic question

question

what is the difference: (define)

char var
char* var
char *var
char** var
char var[]
char* var[]
char** var[]

not so basic I always get confuse If you could answer you are truly among the elite.
I am in relearning process, sorry if i make a mistake

Comments

  • char var; //Variable var holding value of char type.
    char* var; //Variable var is pointer to variable of type char.
    char *var; //Same as above.
    (char*)* var; //Variable var is pointer to variable which is pointer to variable of type char.:)

    char var[]; //Var is array of elements of type char.
    int (*pta)[4]; //Pta is pointer to array of 4 elements of type int
    int* pta[4]; //Pta is array of 4 pointers to int.
    int* (*pta)[4]; //Pta is pointer to array of 4 elements of type pointer to int
    (int*)* pta[4]; //Pta is array of 4 pointers to pointers to int.

    I think. :)


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion