Suppose c is a variable of type char. We want to know if c is a lowercase vowel letter (a/e/i/o/u). What is wrong with the following comparison?

if (c == 'a' || 'e' || 'i' || 'o' || 'u')


We have to repeat the “c ==” each time we want to perform a comparison. A vowel by itself is not a boolean expression.

Computer Science & Information Technology

You might also like to view...

What will executing the following snippet of code do?

Dim example As String = "Good" example &= " Books" a) This will produce an error. b) This will not produce an error; however, line 2 will not change the String example. c) This will not produce an error, and example’s value becomes " BooksGood". d) This will not produce an error, and example’s value becomes "Good Books".

Computer Science & Information Technology

What method in what interface is used in a GUI application to detect that a user typed the letter'Y'?

What will be an ideal response?

Computer Science & Information Technology

Although Word and Excel can store data in tables, the true power of using Access instead of Word or Excel is its ability to ________ tables

A) share B) bind C) relate D) link

Computer Science & Information Technology

Clicking the item marked 2 in the figure above opens a menu from which you can choose to ________________.

A. Update tasks B. Reschedule Work C. Delete baselines D. None of the above

Computer Science & Information Technology