YOUR SUBJECT CS608 Software Verification and ValidationChange subject ↗
Introduction to Programming

Question #44

Read the question, compare the options, and review the correct answer below.

CS201 · Midterm#44

Which of the following is correct way to initialize a variable x of int type with value 10?

  1. A
    int x ; x = 10;
  2. B
    int x = 10;
  3. C
    int x, x = 10;
  4. D
    x = 10;
Show correct answer

Correct answer: B. int x = 10;

Check community answers against your course notes.
← More practice questionsTake a timed test