Exam 1z0-811 All QuestionsBrowse all questions from this exam
Question 30

Which statement is valid?

    Correct Answer: C

    The valid statement is 'int totalScore2 = 0;'. In programming, variable names must begin with a letter, $ character, or underscore and can include numbers after the initial character. Option A ('int 2 totalScore = 0;') is invalid because it begins with a number. Option B ('int total–score = 0;') is invalid due to the dash character; the correct character for separation is an underscore (_). Option D ('int total score = 0;') is invalid because it contains a space. Therefore, option C ('int totalScore2 = 0;') is the correct and valid declaration.

Discussion
arjunec1Option: C

Only valid option is C. variable names can start with letters, $, or _, but not with numbers.variable name can contain a number but not at start.

im2wishesOption: C

the correct answer is C .

Yousef10Option: C

CORRECT ANSWER IS C

hardex01Option: C

answer is C

SKHULUOption: C

Beyond doubt, correct answer is C.

darius123Option: C

The correct answer is C

DobrevDOption: A

Hi, I can not understand why the answer ist A. Can you please explain it to me. Thank you

Yousef10

it's a wrong answer , the correct answer is C