What will be the output produced by the following C code: int main() { int array[5][5]; printf("%d",( (array == *array) && (*array == array[0]) )); return 0; }
Anonymous
array is a 2D array → type is int[5][5] array means → first row of the array → so, it's int[5] array == *array → both point to the same starting address of row 0 → so true *array == array[0] → both also point to the 1D array of first row → again true So, both conditions are true → true && true = 1 That's why output is 1
Check out your Company Bowl for anonymous work chats.