What is the output of this C code? \[\]void main() { \[\]int x = 18; \[\]void *ptr = &x; \[\]printf("%f\n", *(float *)ptr);
Step-by-step Solution:
This is because dereferencing a cast pointer from an integer to a float introduces undefined behaviour. \[\] Correct Answer: (b)