File tree Expand file tree Collapse file tree 4 files changed +43
-1
lines changed Expand file tree Collapse file tree 4 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ using namespace std;
33
44int main ()
55{
6- int a = 5 , b = 3 ;
6+ int a = 5 , b = 2 ;
77 cout << " Sum of " << a << " and " << b << " is " << a + b;
88 return 0 ;
99}
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ using namespace std ;
3+
4+ int main ()
5+ {
6+ int a = 343 ;
7+ float b = 87.94 ;
8+
9+ cout << (float )a / 34 << endl;
10+ cout << (int )b;
11+
12+ return 0 ;
13+ }
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ using namespace std ;
3+
4+ int main ()
5+ {
6+ string name = " Mooazam" ;
7+
8+ cout << " The name is " << name << endl;
9+ cout << " The length of name is " << name.length () << endl;
10+ cout << " The name is " << name.substr (1 , 155 ) << endl;
11+ cout << " The name is " << name.substr (2 , 3 );
12+
13+ return 0 ;
14+ }
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+ using namespace std ;
3+
4+ int main ()
5+ {
6+ float a = 34.34 ;
7+ float *ptra;
8+ ptra = &a;
9+ cout << " The value of a is " << a << endl;
10+ cout << " The value of a is " << *ptra << endl;
11+ cout << " The address of a is " << &a << endl;
12+ cout << " The address of a is " << ptra << endl;
13+
14+ return 0 ;
15+ }
You can’t perform that action at this time.
0 commit comments