Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Explain the extern storage classes in c++.

1048


What is a modifier in c++?

1138


Is swift faster than c++?

1017


What do you mean by inheritance in c++?

1094


What is atoi in c++?

1072


Is c++ a pure oop language?

1077


What does it mean to declare a member function as virtual?

1075


What does ios :: app do in c++?

1027


Is c++ free?

1097


what is COPY CONSTRUCTOR and what is it used for?

1071


What is set in c++?

1122


What are the restrictions apply to constructors and destructors?

1079


What is the oldest programming language?

1014


What are the advantages of using a pointer?

1074


Explain the uses of static class data?

1100