0

What is the output of this C code?

I dont understand the output someone please explain. int arr[4] = {1, 2, 3, 4}; printf("%d", *arr);

7th Oct 2020, 11:48 AM
Bibek Oli
Bibek Oli - avatar
1 Resposta
+ 5
*arr it simply pointing to first index of array It will be like this *(arr+0) which pointing 0th position. So Output of your code will be 1 If u will write like this *(arr+3) then in this case Answer will be 4
7th Oct 2020, 12:57 PM
A S Raghuvanshi
A S Raghuvanshi - avatar