Q:

What will be the output of the below C program?

0

What will be the output of the below C program?

#include <stdio.h>
int main()
{
    char var = 10;
    void *ptr = &var;
    printf("%d %d",*(char*)ptr,++(*(char*)ptr));
    return 0;
}

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Output: undefined

Explanation: Due to the sequence point the output vary on a different platform.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now