Question 84

Computer Awareness Introduction to C/C++ Easy

Which of the following is a correct way to declare a variable in C?

(A) int x;
(B) x int;
(C) int x="10";
(D) float x='10';
✓ Correct Answer: Option A Verified Solution

📘 Step-by-Step Solution & Detailed Explanation:

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;

Practice Similar Introduction to C/C++ Questions

Reinforce your conceptual grasp with related questions from MAH MCA CET 2025:

Q86 What will be the output of the following code? #include int...
Solve →
Q81 Which of the following is not a type of computer architecture?
Solve →
Q82 What is the binary equivalent of the decimal number 13?
Solve →
Q83 What is the result of the binary subtraction 1100 - 1010 using 2's...
Solve →
Q85 What is the main difference between a process and a thread?
Solve →
Full-Length Test Series

Prepare for MAH MCA CET Under Real Exam Conditions

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 →