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; }
Output: undefined
Explanation: Due to the sequence point the output vary on a different platform.
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
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