+ 2

What is this in c ?

Int a[]; Int *p; *p=*a; Can any explain what this is do

9th Feb 2019, 1:50 PM
Programmer Raja
Programmer Raja - avatar
3 odpowiedzi
+ 2
First int a[] is equal to int *a. Second: a and p are pointers to ints. Third: *p evaluate value instead of location in memory. Summary: We assign value of *a to *p.
9th Feb 2019, 2:29 PM
Bartosz Pieszko
Bartosz Pieszko - avatar
+ 6
With the code as is, you may get an error because you are trying to access the value pointed to by p without having initialised p yet.
11th Feb 2019, 3:10 AM
Sonic
Sonic - avatar
+ 4
Read about pointer values
9th Feb 2019, 7:34 PM
Da2
Da2 - avatar