string somestring ;
Which of the following choices will convert a standard C++
string object "somestring" to a C string?
a) Copy.somestring () ;
b) somestring.c_str ()
c) &somestring [1]
d) std::cstring (somestring)
e) (char *) somestring



string somestring ; Which of the following choices will convert a standard C++ string object &qu..

Answer / guest

'B' is the answer

Is This Answer Correct ?    9 Yes 0 No

Post New Answer

More C++ General Interview Questions

What is a manipulative person?

0 Answers  


What are associate containers?

0 Answers  


what is smart pointer & use of the smart pointer ???

2 Answers  


Explain the difference between struct and class in terms of access modifier.

0 Answers  


What are the two types of comments, and how do they differ?

0 Answers  






What is Destructor in C++?

0 Answers  


What is the Difference between "C structure" and "C++ structure"?

12 Answers  


Explain about profiling?

1 Answers  


What do you mean by late binding?

0 Answers  


What is class syntax c++?

0 Answers  


What is the main purpose of overloading operators?

0 Answers  


What is difference between initialization and assignment?

12 Answers   HCL, HP, Infosys,


Categories