1,307 views
0 0 votes
what wiill be the output?

#include<stdio.h>
void main()
{
    int x;
    int a[] = {1, 2, 3, 4};
    int *p = a;
    for(int i=0; i<=3; i++)
    {
        x = *(p+i);
        printf("%d ",x);
    }
    printf("\n");
    for(int i=0;i<=3; i++)
    {
        x= *(p-i);
        printf("%d ", x);
    }
}

1 Answer

Position:
Show:

No related questions found