Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78976221
ch-05-ex-02-solution.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
Sat, Aug 24, 02:14
Size
422 B
Mime Type
text/x-c
Expires
Mon, Aug 26, 02:14 (2 d)
Engine
blob
Format
Raw Data
Handle
20130582
Attached To
R9360 PCSC_git
ch-05-ex-02-solution.cpp
View Options
/*
* chapter-05-exercise-02.cpp
*
* Pointers and functions #2
*
* Created on: Oct 8, 2012
* Author: Radu Popescu <radu.popescu@epfl.ch>
*/
#include <iostream>
void f(int *const x) { (*x)++; }
int main(int argc, char *argv[]) {
int x = 5;
std::cout << "The value before calling f(x) is: " << x << std::endl;
f(&x);
std::cout << "The value after calling f(x) is: " << x << std::endl;
return 0;
}
Event Timeline
Log In to Comment