•What does the following code print:
•char foo = ‘b’, bar = ‘a’;
•n = 4;
•while ( n < 20 )
•{
• if ( n % 4 == 0)
• {
• cout << foo;
• }
• if ( n % 2 == 0)
• {
• cout << bar;
• }
• n = n + 2;
•}
•cout << ‘c’;
•What does the following code print:
•char foo = ‘b’, bar = ‘a’;
•n = 4;
•while ( n < 20 )
•{
• if ( n % 4 == 0)
• {
• cout << foo;
• }
• else if ( n % 2 == 0)
• {
• cout << bar;
• }
•n = n + 2;
•}
•cout << ‘c’;