Sail E0 Webinar
Question


What is the output of this program?


1.
#include
2.
#include
3.
using namespace std;
4.
int main ()
5.
{
6.
string str ("Ubuntu");
7.
cout
Options:
A .  61073741820
B .  51073741820
C .  6 and max size depends on compiler
D .  none of the mentioned
Answer: Option C

In this program, We are printing the capacity and max size of the string.
Output:
$ g++ stri5.cpp
$ a.out
61073741820




Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers