-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path07variables_typescript.cpp
More file actions
53 lines (40 loc) · 1.36 KB
/
07variables_typescript.cpp
File metadata and controls
53 lines (40 loc) · 1.36 KB
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
53
#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 litereals*********/
// float d = 67.94949f;
// long double e = 78.377373l;
// cout<<"the value of d is"<<d<<endl<<"the value of e is"<<e;
// cout<<endl;
// cout<<"the size of 67.94949 is "<<sizeof(67.94949)<<endl;
// cout<<"the size of 67.94949f is "<<sizeof(67.94949f)<<endl;
// cout<<"the size of 67.94949F is "<<sizeof(67.94949F)<<endl;
// cout<<"the size of 67.94949l is "<<sizeof(67.94949l)<<endl;
// cout<<"the size of 67.94949L is "<<sizeof(67.94949L)<<endl;
// //***************Reference Variables*********/
// float x = 455;
// float & y = x;
// cout<<y<<endl;
//************typecasting***********/
// int a = 76;
// float b = 89.939;
// cout<<"the valur of a is "<<(float)a<<endl;
// cout<<"the valur of a is "<<float(a)<<endl;
// cout<<"the value of b is "<<(int)b<<endl;
// cout<<"the value of b is "<<int(b)<<endl;
// cout<<endl;
// 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;
}