Midterm 1 Review Quiz 09

0 negative zero arf endl

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: is
the
output
of
each
of
the
following
segments
of
code?
 
 (a) int a = 2; cout << a;
 (b) 
 int a = 2; cout << "a";
 
 
 
 (c) 
 int a = 2.5; cout << a;
 
 
 
 (d) 
 bool b = (5 > 4) && (2 != 0); cout << b;
 
 
 
 (e) 
 int a = 99; cout << a++;
 
 
 
 
 (f) 
 if (5 % 4) { cout << "Baa! "; } else { cout << "Moo! "; }
 
 
 
 (g) 
 int x = 1; do { cout << } while (x > 
 
 
 
 (h) 
 for (int i =...
View Full Document

This note was uploaded on 02/08/2014 for the course CS 115 taught by Professor Staff during the Fall '08 term at Sonoma.

Ask a homework question - tutors are online