In distinguishing an expression as true or false, C++ sees which of the following as true?

a) true
b) 0
c) 1
d) Any non-zero value
e) The character 'F'


a) true, c) 1, d) Any non-zero value, and e) The character 'F'
‘F’ is coerced char to bool, perhaps through an intermediate type

Computer Science & Information Technology

You might also like to view...

Desktop publishing software is _____.

A. document-based B. frame-based C. windows-based D. table-based

Computer Science & Information Technology

The array_key_exists() function determines whether a given index or key exists.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Advocates for autonomous vehicles argue that these vehicles do all of the except _______ .

A. create more jobs for car and truck drivers B. save lives C. lower the cost of transporting goods D. provide transportation for people with disabilities

Computer Science & Information Technology

Which of the following is a base case for a recursive binary search algorithm? (first is the index of the first item in the array, last is the index of the last item in the array, and mid is the midpoint of the array).

a. last > first b. first > last c. 0 <= first d. last <= SIZE-1

Computer Science & Information Technology