Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Write a program to display the following output using a single cout statement
Maths=90
Physics=77
Chemistry = 69

Answers were Sorted based on User's Feedback



Write a program to display the following output using a single cout statement Maths=90 Physics=77 ..

Answer / hr

#include<iostream>
#include<iomanip>
using namespace std;
int main()
{

char *sub[]={"Maths","Physics","Chemestry"};
int mark[]={90,77,69};
for(int i=0;i<3;i++)
{
cout<<setw(10)<<sub[i]<<setw(3)<<"="<<setw(4)<<mark[i]<<endl;
}
return 0;
}
Output:
Maths=90
Physics=77
Chemistry=69

Is This Answer Correct ?    0 Yes 0 No

Write a program to display the following output using a single cout statement Maths=90 Physics=77 ..

Answer / hr

#include<iostream>
#include<iomanip>
using namespace std;
int main()
{

char *sub[]={"Maths","Physics","Chemestry"};
int mark[]={90,77,69};
for(int i=0;i<3;i++)
{
cout<<setw(10)<<sub[i]<<setw(3)<<"="<<setw(4)<<mark[i]<<endl;
}
return 0;
}
Output:
Maths=90
Physics=77
Chemistry=69

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

What is Copy Constructor?

5 Answers   ABC, Siemens,


What is the meaning of the following declaration: int *const *const *i?

0 Answers   Adobe,


Name the operators that cannot be overloaded.

1 Answers   Wipro,


What is the difference between member functions and static member functions?

0 Answers   Alter,


What's the value of the expression 5["abxdef"]?

0 Answers  


Write a C++ Program to Find whether given Number is Odd or Even.

1 Answers  


Write a program to display the following output using a single cout statement Maths=90 Physics=77 Chemistry = 69

2 Answers  


Explain the difference between C and C++.

1 Answers   Accenture,


Do you know about Agilent PRECOMPILERS. ?

0 Answers   Agilent,


What are pass by value and pass by reference?what is the disadvantage of pass by value?

0 Answers   Alter,


Explain the importance of method overloading in C++?

0 Answers   Akamai Technologies, Infogain,


what do you mean by exception handling in C++?

0 Answers   Alter,


Categories