Guess the output:

#include stdio.h

int main()
{
    void sookshmas(int, int[]);
    int arr[] = {7,1,4,5};
    int i;
    sookshmas(4, arr);
    for(i=0; i4; i++)
        printf("%d,", arr[i]);
    return 0;
}
void sookshmas(int n, int arr[])
{
    int *p=0;
    int i=0;
    while(i++  n)
        p = &arr[i];
    *p=0;
}

Posted on by