-
Notifications
You must be signed in to change notification settings - Fork 0
/
reference.cpp
50 lines (44 loc) · 1023 Bytes
/
reference.cpp
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include<iostream>
using namespace std;
int main()
//*****REFERENCE VARIABLES*******
//{
//
// float x=455;
// float &y=x;
// cout<<x<<endl;
// cout<<y<<endl;
// return 0 ;
//}
//********** same output
//{
//int a=45;
//float b=45.46;
//cout<<"the values of a is"<<(float)a<<endl;
//cout<<"the values of a is"<<(float)a<<endl;
//cout <<"the value of b is"<<(int)b<<endl;
//cout <<"the value of b is"<<(int)b<<endl;
//return 0;
//}
//***********
//{
//int a=45;
//float b=45.46;
//cout<<"the values of a is"<<(float)a<<endl;
//cout<<"the values of a is"<<(float)a<<endl;
//cout <<"the value of b is"<<(int)b<<endl;
//cout <<"the value of b is"<<(int)b<<endl;
//int c=int(b);
//cout<<"the expression is"<<a+b;
//cout<<"the expression is"<<a+int(b);
//cout<<"the expression is"<<a+(int)b;
//return 0;
//}
//**********************************************
{
const int a=3;
cout<<"the value of a was:"<<a<<endl;
a=45;
cout<<"the value of a is:"<<a<<endl;
return 0;
}