1. Predict the output or error(s) of the following c code

1
2
3
4
5
void main()
{
	int  const * p=5;
	printf("%d",++(*p));
}

Click here to view the answer


One Response to “1. Predict the output or error(s) of the following c code”

  1. Rasmi Ranjan Nayak

    void main()
    {
    int const x = 5;
    int* p;
    p = &x;
    ++*p;

    printf(“%d \n”,x);
    printf(“%d”,*p);
    }

    op:- 5, 6 Why? Think!!!

    Reply

Leave a Reply