Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121657636
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, Jul 12, 21:43
Size
422 B
Mime Type
text/x-c
Expires
Mon, Jul 14, 21:43 (2 d)
Engine
blob
Format
Raw Data
Handle
27368688
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