+ 1

Is there any difference between *p = &a And int *p ; p=&a;

15th Mar 2017, 9:25 AM
Jatin Grover
Jatin Grover - avatar
2 Answers
+ 1
Pointer saves address of any variable. Second one is correct and first one is wrong.
15th Mar 2017, 10:08 AM
Mohit Kumar
Mohit Kumar - avatar
+ 1
unless it is being initialised and mobile typing got in the way. I.e. int a = 80085; int *p = &a;
15th Mar 2017, 11:22 AM
Elric Hindy
Elric Hindy - avatar