0
What will be the output of the following code?
#include <stdio.h>
int main() {
int arr[] = {1, 2, 3, 4, 5};
printf("%d %d \n", arr[2], *(arr + 2));
return 0;
}- A3 3
- B2 2
- CCompilation Error
- DUndefined Behavior
Correct answer: A
#include <stdio.h>
int main() {
int arr[] = {1, 2, 3, 4, 5};
printf("%d %d \n", arr[2], *(arr + 2));
return 0;
}