Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 12 / references.cpp
blob: 5922d337dd940ae1672a75d4019271e74ae9b94d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <iostream>
using namespace std;

void f(int a)
{
	a += 5;

}
void f2(int& a) 
{
	a += 5;
}

int main()
{
	int x = 10;
	f(x);
	cout << x << endl; //10

	f2(x);
	cout << x << endl; //15
}