0

explain this question

int a[5] = {22, 33, 44, 55, 66}; int *ptr = a; int res = *(ptr + 2); printf("%d", res);

28th Jan 2019, 9:47 AM
Jegan A
Jegan A - avatar
1 Respuesta
+ 1
Should print 44. This basically shows how arrays are implemented: a being a pointer, and a[2] being equivalent to *(a+2).
28th Jan 2019, 9:56 AM
Zen
Zen - avatar