0
What is the output of the given C programming code?
#include <stdio.h>
void modify(int arr[], int n)
{
for(int i = 0; i < n; i++)
arr[i] = arr[i] * 2;
}
int main()
{
int data[] = {1, 2, 3, 4};
modify(data, 4);
printf("%d", data[2]);
return 0;
}- A8
- B4
- C6
- D2
Correct answer: C