Question
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string mys;
char mya[20]= "Hello world";
mys = mya;
cout << mys << '\n';
return 0;
}
a.
Hello world
b.
Hello
c.
Error
d.
Runtime error
Posted under Object Oriented Programming Using C++
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this program?
Similar Questions
Discover Related MCQs
Q. When does the next sequence point start?
View solution
Q. What is meant by heap?
View solution
Q. Which value is pointed out first in heap?
View solution
Q. Which operator is used to compare the elements in heap?
View solution
Q. How to protect the heap from affecting the memory?
View solution
Q. In what form does the STL provides heap?
View solution
Q. How many types are there in binary heaps?
View solution
Q. Which keyword is used to declare the min and max functions?
View solution
Q. What kind of functions are min and max in c++?
View solution
Q. How many parameters are needed for minmax function?
View solution
Q. Which function is used to return the minimum element in the range?
View solution
Q. Which operator is used to compare the values to find min and max?
View solution
Q. What is meant by permutation in c++?
View solution
Q. How the different permutations are ordered in c++?
View solution
Q. Pick out the correct statement about permutation.
View solution
Q. What is the header file for vector permutation?
View solution
Q. How many parameters are required for next_permutation?
View solution
Q. Pick out the in correct type of function in header file.
View solution
Q. What type of algorithm is not available in creating our own STL style algorithms?
View solution
Q. What is meant by hash tables in C++?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Object Oriented Programming Using C++? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!