Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

#include<iostream>

using namespace std;

int main(){

cout<<"\n the size of (char) is : " <<sizeof(char)<<" bytes\n";

cout<<"\n the size of (short) is : " <<sizeof(short)<<" bytes\n";

cout<<"\n the size of (int) is : " <<sizeof(int)<<" bytes\n";

cout<<"\n the size of (long) is : " <<sizeof(long)<<" bytes\n";

cout<<"\n the size of (longlong) is : " <<sizeof(long long)<<" bytes\n";

return 0;

#include<iostream>

using namespace std;

int main()

cout << "\n\n Print the result of some specific operation:\n";

cout<<"Result of 1 st expression is: "<< (-1+4*6) <<"\n";

cout<<" Result of 2nd expression is: "<< ((35+5)%7) <<"\n";

cout<<"Result of 3rd expression is: "<< (14+-4*6/11) <<"\n";

cout<<"Result of 4th expression is: "<< (2+15/6*1-7%2) <<"\n\n";

return 0;

}
#include<iostream>

using namespace std;

int main(){

int a,b;

cout<<"\nEnter the first number: ";

cin>>a;

cout<<"25 ";

cout<<"\nEnter the second number:";

cin>>b;

cout<<" 39\n ";

cout<<"\nBefore swapping: ";

cout<<"\nfirst number = "<<25<<" \nsecond number = "<<39<<endl;

cout<<"\nAfter swapping: ";

cout<<"\nfirst number = "<<39<<" \nsecond number = "<<25<<endl;

return 0;

You might also like