Is there a datatype string in c++?How is the memory allocation?
Answer Posted / nithin devang
There is no DataType called String in C++.
String can be created using character array and delimited by
null character i.e. '/0'.
like char name[]={'n','i','t','h','i','n','
','d','e','v','a','n','g','0'}
or
char name={"nithin devang"}//it will automaticall append
null char.
Null character is having value (ASCII) Zero. (0 character
dont have ascii value 0)
--
If you still wish to use the keyword string you may declare
a macro
#define String char[];
my answer surety %=98%
-------------------
Read Expert C programming, The deep C secrets by Peter Van
Der Linden
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What kind of problems can be solved by a namespace?
What is virtual table?
Can I uninstall microsoft c++ redistributable?
What do you understand by pure virtual function? Write about its use?
What is a pdb file?
What is pure virtual function?
How can a called function determine the number of arguments that have been passed to it?
How would you use the functions sin(), pow(), sqrt()?
What is the average salary of a c++ programmer?
What is object in c++ example?
what is a reference variable in C++?
What's the hardest coding language?
What are virtual constructors/destructors?
What does iomanip mean in c++?
Which operator cannot overload?