What is the output of this C code? \[\]void main() { \[\]int x = 18; \[\]void *ptr = &x; \[\]printf("%f\n", *(float *)ptr);
This is because dereferencing a cast pointer from an integer to a float introduces undefined behaviour. \[\] Correct Answer: (b)
Reinforce your conceptual grasp with related questions from CUET-MCA 2021:
Take timed full-length mock tests with authentic question distributions, negative marking (+12/-3 in Math), and instant All India Rank calculation.
Start Free Mock Test Series →