Qmark: 1
Total Marks: 50
Vol: 8
Font: Microsoft Sans Serif
Size: 10
Time Left:46:39
Multiple Choices
(Choose 1 answer)
What is the output when the sample code below is executed?
void inc(int* a) {
for(int i = 0;i<5;i++)(*a)++;
}
int main() {
int x = 1;
inc(&x);
printf("%d", x);
}
A. 1
B. 4
C. 5
D. 6