What is the Output Exercises Chapter 03

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

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

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 :

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

View Full Document
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 :
3. What is the output of the following program ? #include

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

View Full Document
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
Ask a homework question - tutors are online