+ 1

Is it necessary to use pointers ? And why

Example array a printf ("%d",a [i]); p=a; printf ("%d",*(ptr+i)); Why use pointer if we can directly use array variable?

27th Jun 2019, 5:41 PM
Kiran Borade
Kiran Borade - avatar
4 ответов
+ 1
Sorry I didn't get you
27th Jun 2019, 5:43 PM
Kiran Borade
Kiran Borade - avatar
0
The compiler automatically turns your first case into the other case, so yes, and you can use pointers in other ways too
27th Jun 2019, 5:42 PM
Airree
Airree - avatar
0
You have to compile your code first; and the compiler will turn the first case into the other case
27th Jun 2019, 5:45 PM
Airree
Airree - avatar
0
You have to compile your code first; and the compiler will turn the first case into the other case
27th Jun 2019, 5:45 PM
Airree
Airree - avatar