MCQOPTIONS
Bookmark
Saved Bookmarks
→
C++ Programming
→
Constructors And Destructors in C++ Programming
→
How many types of representation are in the string..
1.
How many types of representation are in the string?
A.
4
B.
3
C.
2
D.
1
E.
None of these
Answer» D. 1
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <string><br> using namespace std;<br> int main ()<br> {<br> string s ("InterviewMania");<br> string::reverse_iterator Rev;<br> for (Rev = s.rbegin(); Rev < s.rend(); Rev++ )<br> cout << *Rev;<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <cstring><br> using namespace std;<br> int main ()<br> {<br> char s1[10] = "Interview";<br> char s2[10] = "Mania";<br> char s3[10];<br> int length ;<br> strcpy( s3, s1);<br> strcat( s1, s2);<br> length = strlen(s1);<br> cout << length << endl;<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <string><br> using namespace std;<br> int main ()<br> {<br> string s ("Interview Mania");<br> cout << s.capacity();<br> cout << s.max_size();<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <string><br> using namespace std;<br> int main ()<br> {<br> string s ("Interview Mania");<br> for (size_t k = 0; k < s.length();)<br> {<br> cout << s.at(k-1);<br> }<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <string><br> using namespace std;<br> int main ()<br> {<br> string s ("Interview Mania is being legend");<br> string::iterator itr;<br> s.erase (s.begin()+ 15, s.end()-7);<br> cout << s << endl; <br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <string><br> using namespace std;<br> int main ()<br> {<br> string s="Manjesh Ojha founded the Interview Mania";<br> string s2 = s.substr (0, 12);<br> unsigned pos = s.find("the");<br> string s3 = s.substr (pos);<br> cout << s2 << ' ' << s3 << ' n';<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <string><br> using namespace std;<br> int main ()<br> {<br> string name ("Manjesh");<br> string family ("Ojha");<br> name += " Interview Mania ";<br> name += family;<br> name += ' n';<br> cout << name;<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <string><br> using namespace std;<br> int main ()<br> {<br> string str ("Testing str...");<br> for ( string :: iterator Iter = str.begin(); Iter != 5; ++Iter)<br> cout << *Iter;<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <string><br> using namespace std;<br> int main ()<br> {<br> string s1;<br> string s2="Manjesh Ojha";<br> string s3="He founded Interview Mania";<br> s1.append(s2);<br> s1.append(s3, 2, 4);<br> s1.append(s3.begin() + 6, s3.end());<br> s1.append<int>(5, 0x2E);<br> cout << s1 << ' n';<br> return 0;<br> }<br></int></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> #include <string><br> using namespace std;<br> int main ()<br> {<br> string str ("Prayagraj Shakya");<br> cout << str.capacity() << " n";<br> return 0;<br> }<br></pre>
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply