Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120767774
exercise05-2.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jul 6, 22:09
Size
481 B
Mime Type
text/x-c
Expires
Tue, Jul 8, 22:09 (2 d)
Engine
blob
Format
Raw Data
Handle
27232243
Attached To
R1106 Programming Concept Rouaze
exercise05-2.cpp
View Options
/*
* exercise05-1.cpp
*
/*
* Any headers you need to include should be specified on the next lines
*/
#include <iostream>
void changeVal(double *address, double newVal);
int main(int argc, char* argv[])
{
double i = 5;
double *adr = &i;
double value = 6;
std::cout << "Value before :"<< i << std::endl;
changeVal(adr, value);
std::cout << "Value after : " << i << std::endl;
return 0;
}
void changeVal(double *address, double newVal)
{
*address = newVal;
}
Event Timeline
Log In to Comment