asd

C++ code posted by asd
created at 22 Dec 15:56

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include<iostream>
using namespace std;
void lolo(int &a)
{
  a = 3;
}
void lol(int* a)
{
  *a = 44;
}
int main()
{
  int a = 5;
  int* b = &a;
  *b = 6;
  cout<<a<<endl;
  lolo(a);
  cout<<a<<endl;
  int &c = a;
  c = 11;
  cout<<a<<endl;
  lol(&a);
  cout<<a;
  return 0;
}
301 Bytes in 2 ms with coderay