(What Prints?) Assume i = 1, j = 2, k = 3 and m = 2. What does each statement print?
Solution:
1 0 1 0 1 0 0 1 0
a) cout << ( i == 1 ) << endl; b) cout << ( j == 3 ) << endl; c) cout << ( i >= 1 && j < 4 ) << endl; d) cout << ( m <= 99 && k < m ) << endl; e) cout << ( j >= i || k == m ) << endl; f) cout << ( k + m < j || 3 - j >= k ) << endl; g) cout << ( !m ) << endl; h) cout << ( !( j - m ) ) << endl; i) cout << ( !( k > m ) ) << endl;
Solution:
1 0 1 0 1 0 0 1 0
Post A Comment:
0 comments: