13vcl03

13vcl03



// Filename: VALUPASS.CPP // Passes an argument from main()

// to another function by value #include <iostream.h> tfinclude <conio.h>

getlt(int i);    // the function's prototype

void main()

{

int i; clrscr();

cout « 'Tm now in main()... \n"; cout « "Please enter a value for i: cin » i;

~3    *    1

getlt(i); // No data types, just the variable

cout « "\n\nBack in main(), the value is still ,,«i«'\n cout « "Press a key to return to the IDE..."; getch();

return; // Return to the IDE 4-1+-1

J1********^r************************************************

getlt(int i)

{

// getlt () now has a local variable called i also cout « "\n\nJust got to getlt() and i is " « i « '\n'; i *=5;

cout « "After multiplying by 5, i is now " « i « '\n'; return 0;    // Return to main()


Wyszukiwarka

Podobne podstrony:
13vcl03 // Filename: VALUPASS.CPP // Passes an argument from main() // to another function by value
13vcl03 // Filename: VALUPASS.CPP // Passes an argument from main() // to another function by value
56. B.107497/1 HAYEK : a collaborative biography. Part 1, Influences, from Mises to Bartley / ed. by
Multiculturalism From Crisis to Renewal? Edited by Mariusz Kwiatkowski, Anna Mielczarek-Żejmo, 
00463 bcaec2dfad584cf6031b64ffdea014 468 Russell The second segment is of shorter duration than th
IMAG0272 (Kopiowanie) 7Jit an ąmbieat temperaturę from 27F to 113F use machinę oil(GB443~S4) NI 5 Al
An extract from the Circuit for the System 80 Computer, showing the RAMs, ROMs and address decoding.
"Place 15A An invitation from a National Society to act as host for an International Confe
S5006939 (2) by way of the Madarovce culture. An argument against linking thc piąte with casting act
screenshot 1 Add an Image From Computer From URL Gallery(2) Media Library Incłude in gaDery: AD
bent 2 Straiijht...an insurance inrestigator recalled to his childhood Home uncovers a body and ghos
Brian Lumley [Necroscope] The Source ?ck T. ITHE HORROR FROM BEYOND An invosion from on alien
04vcl02 variable definition comments // Filename: DISSECT.CPP // Simple program for you to

więcej podobnych podstron