Practice Set 2
Accenture Success Primer ExammediumMay 2026 DumpsProgramming

Predict the output: var x = 5 ^ "0"; document.write(parseInt(x));

Answer options

A
Compile Time Error
B
NaN
C
0
D
5

Correct answer: 5

Explanation

Quick AnswerThe correct answer is 5 because it directly addresses the core logic of Practice Set 2.

JavaScript coerces "0" to 0 for bitwise operations. 5 XOR 0 equals 5.

Related Accenture Practice Set 2 questions

Practice more Accenture Practice Set 2 questions

PrimerPrep has 1400+ practice questions, 2026 simulations and coding hands-on — all free.

Watch Walkthroughs!