Skip to content

Commit de13931

Browse files
authored
Merge pull request #28 from MHMITHUN/patch-4
pointer.cpp
2 parents 5e30a6d + bda23bf commit de13931

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

pointer.cpp

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include <iostream.h>
2+
3+
#include <ctime.h>
4+
5+
void gS(unsigned long *par); //function declaration
6+
7+
int main () {
8+
9+
unsigned long sec;
10+
11+
gS( &sec );
12+
13+
// print the actual value
14+
15+
cout << "Number of seconds :" << sec << endl;
16+
17+
return 0;
18+
19+
}
20+
21+
void gS(unsigned long *par) { //function definition
22+
23+
// get the current number of seconds
24+
25+
*par = time( NULL );
26+
27+
}

0 commit comments

Comments
 (0)