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 ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to explain our contribution in the project?

3638


Does c++ have foreach?

979


What you know about structures in C++?

1007


Can a new be used in place of old mallocq? If yes, why?

1038


What are the various operations performed on stack?

1034


What is a type library?

1062


What is the latest c++ version?

1052


How can an improvement in the quality of software be done by try/catch/throw?

1003


What is std namespace in c++?

1117


What are the extraction and insertion operators in c++?

947


What is the use of object in c++?

1050


Can I learn c++ without knowing c?

1001


Which programming language's unsatisfactory performance led to the discovery of c++?

1261


What are the steps in the development cycle?

1033


How many ways can a variable be initialized into in C++?

971