engineering recuitment GATE CSE 2023-24 Test Series Programming and Data Structure Programming in C Array
What will be the output of the following C program:(consider int is of 4 bytes and array (arr) starting address is 2000 in decimal )
#include
int main()
{
int arr[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
printf("%u\n",(arr+1));
printf("%u",(&arr + 1));
return 0;
}
1
Segmentation error
2
2004
2004
2004
3
2004
2040
2040
4
2004
Garbage value
Garbage value