0
int*p=&var ---- what is this????
3 Respuestas
+ 1
It is simply example of declaring and initialising a pointer at the same time , it shortens the code size.
Int var;
Int *ptr ;
ptr = &var ;
Or simply you can write
Int var;
Int *ptr=&var ;
0
This is example if work with a pointer variable. The pointer variable does not contain any value (as number, string,..], but points to another variable (or later into dynamic variable in memory]. So the example says
int*p=&var;
declare p as pointer to integer variable
and points to variable var...
0
as Petr said, p is essentially a variable that stores the memory address of another variable.