Assignment Format
Assignment Format
[Document subtitle]
Contents
Ans1:......................................................................................................................................................2
Ans2:......................................................................................................................................................2
Ans3:......................................................................................................................................................3
Ans4:......................................................................................................................................................4
Ans5:......................................................................................................................................................5
Ans1:
Code
#include <iostream>
using namespace std;
int a = 10;
int main() {
int big = 980000;
short small;
cout << "big=" << big << endl;
small = big; //don't do this
cout << "small=" << small << endl;
cin >> a;
return 0;
}
Output:
Ans2:
Code
#include <iostream>
using namespace std;
int a = 10;
int main() {
int big = 980000;
short small;
cout << "big=" << big << endl;
small = big; //don't do this
cout << "small=" << small << endl;
cin >> a;
return 0;
}
Output:
Ans3:
Code
#include <iostream>
using namespace std;
int a = 10;
int main() {
int big = 980000;
short small;
cout << "big=" << big << endl;
small = big; //don't do this
cout << "small=" << small << endl;
cin >> a;
return 0;
}
Output:
Ans4:
Code
#include <iostream>
using namespace std;
int a = 10;
int main() {
int big = 980000;
short small;
cout << "big=" << big << endl;
small = big; //don't do this
cout << "small=" << small << endl;
cin >> a;
return 0;
}
Output:
Ans5:
Code
#include <iostream>
using namespace std;
int a = 10;
int main() {
int big = 980000;
short small;
cout << "big=" << big << endl;
small = big; //don't do this
cout << "small=" << small << endl;
cin >> a;
return 0;
}
Output: