1

Output of prog ??
Void main( )
{
int a[ ] = {10,20,30};
int j;
int *p= a+3;
for(j=3;j>0;j-)
{
printf("%d",--*p);
p=p-1;
}
}

Comments
  • 2
    So uh this seems like an exam question.

    If you really want to know, use a compiler and run your code.
  • 1
    I think the program you meant was:

    #include <stdio.h>
    int main() {
    int a[] = {10, 20, 30};
    int* p = a+3;
    for (int j = 3; j>0; --j) {
    p = p-1;
    printf("%d", --*p);
    }
    }

    Or something similar.
  • 0
    @halfflat @olback I know the answer but how explain ??
  • 1
    This has to a be a bot. If not, I really want to hear the backstory on why you posted this. I really want to know not to be mean or anything but I'm just curious.
Add Comment