4 Respostas
+ 1
You had a plethora of syntax errors. I think this is what you wanted to do:
#include <stdio.h>
int main() {
int s=0, i=0;
int a[]={9,4,6,1,7,8,3,1};
int *ap=&a;
do{
s+= *ap;
printf("s= %d i= %d *ap= %d\n", s, i , *ap);
ap++;
i++;
} while(i<8);
printf("s= %d i= %d", s, i);
return 0;
}
+ 1
This code was my exam code
I need to analyze code
+ 1
And find the final result of s