Given the following code fragment: int main(void)

Given the following code fragment:
int main(void)
{
int raw[20], i, sum=0;
int *p = raw;
for (i=0; i < 20; i++)
*(p+i) = I;
for(i=0; i < 20; I += sizeof(int))
sum += *(p+i)
printf(“sum = %d\n”, sum);
return();
}
What will be the result of execution?

A) sum = 10
B) sum = 40
C) sum = 60
D) sum = 190

Leave a Reply