Which of the following is a correct way to declare a variable in C?
In C, a variable is declared as type name;, so int x; is correct.
x int; has the wrong order.int x = "10"; assigns a string (a char pointer) to an int, which is invalid.float x = '10'; uses a multi-character constant, which is not a proper float value.Answer: (A) int x;
Reinforce your conceptual grasp with related questions from MAH MCA CET 2025:
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 →