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
#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 |
#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 |
What are string library functions(syntax).
What is Boyce Codd Normal form?
Difference between function overloading and function overriding.
Execute the qsort () in c/sort() in c++ library or your own custom sort which will sort any type of data on user defined criteria.
What kind of problems does name mangling cause?
What is partial specialization or template specialization?
How does stack look in function calls? When does stack overflow? What can you do to remedy it?
Explain the operator overloading feature in C++ ?
What is function overloading and operator overloading in C++?
How to input string in C++
Write a C++ program to print strings in reverse order.
what do you mean by exception handling in C++?