-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvideoseven.cpp
52 lines (41 loc) · 1.54 KB
/
videoseven.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
51
52
#include<iostream>
using namespace std;
int c = 45;
int main(){
// *************Build in Data types****************
// int a, b, c;
// cout<<"Enter the value of a:"<<endl;
// cin>>a;
// cout<<"Enter the value of b:"<<endl;
// cin>>b;
// c = a + b;
// cout<<"The sum is "<<c<<endl;
// cout<<"The global c is "<<::c;
// ************* Float, double and long double Literals****************
// float d=34.4F;
// long double e = 34.4L;
// cout<<"The size of 34.4 is "<<sizeof(34.4)<<endl;
// cout<<"The size of 34.4f is "<<sizeof(34.4f)<<endl;
// cout<<"The size of 34.4F is "<<sizeof(34.4F)<<endl;
// cout<<"The size of 34.4l is "<<sizeof(34.4l)<<endl;
// cout<<"The size of 34.4L is "<<sizeof(34.4L)<<endl;
// cout<<"The value of d is "<<d<<endl<<"The value of e is "<<e;
// *************Reference Variables****************
// Rohan Das----> Monty -----> Rohu ------> Dangerous Coder
// float x = 455;
// float & y = x;
// cout<<x<<endl;
// cout<<y<<endl;
// *************Typecasting****************
int a = 45;
float b = 45.46;
cout<<"The value of a is "<<(float)a<<endl;
cout<<"The value 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<<endl;
cout<<"The expression is "<<a + int(b)<<endl;
cout<<"The expression is "<<a + (int)b<<endl;
return 0;
}