What is the Output Exercises Chapter 03

What is the Output Exercises Chapter 03 - 1 What is the...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1. What is the output of the following program ? #include <iostream.h> int Function1( int ); int Function2( float ); void main() { int ival; float fval; cout << "Function1: \n"; ival = Function1 (3); cout << ival << endl << endl; cout << "Function1: \n"; fval = 4.5; fval = Function1 (fval); cout << fval << endl << endl; cout << "Function2: \n"; fval = 4.5; fval = Function2(fval); cout << fval << endl << endl; } int Function1( int a) { a *= 2; return a; } int Function2( float a) { a /= 2; cout << a << " "; return a; } Answer :
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2. What is the output of the following program ? #include <iostream.h> void Function3(); void main() { cout << "Function3: \n"; Function3(); Function3(); cout << endl; } void Function3( void ) { auto float x = 10.5; register int y = 50; static double z = 21.0; x += 1.25; y -= 49; z /= 2; cout << x << " " << y << " " << z << endl; } Answer :
Background image of page 2
3. What is the output of the following program ? #include
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/27/2010 for the course DS csc 270 taught by Professor Dr.m.g during the Spring '10 term at Notre Dame University-Louaize.

Page1 / 8

What is the Output Exercises Chapter 03 - 1 What is the...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online