Solved

If X Is a Char, and Values Is an Int

Question 37

Multiple Choice

If x is a char, and values is an int array, then values[x]


A) causes a syntax error
B) causes an Exception to be thrown
C) casts x as an int based on x's position in the alphabet (for instance, if x is 'a' then it uses 0 and if x is 'z' then it uses 25)
D) casts x as an int based on x's ASCII value (for instance, if x is 'a' then it uses 97 and if x is 'z' then it uses 122)
E) casts x as an int based on the digit that is stored in x (for instance, if x is '3' it uses 3) but throws an exception if x does not store a digit

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents