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...

what is difference between array of characters and string

Answer Posted / zubair

String is much same as character array, it can also be
checked by each characters:
string str;for(int i=0;str[i]!='\0';i++) cout <<str[i]<<endl;

1. The NULL terminator is loaded automatically in string.('\0')
2.Both of them drop the data after space when we take input.

Is This Answer Correct ?    35 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

4198


largest Of three Number using without if condition?

1540


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

1176


Write a program with dynamically allocation of variable.

1078


What is an lvalue?

1024


What is typedef?

1344


Why we use conio h in c?

1165


What are pragmas and what are they good for?

943


What are c header files?

957


What is difference between Structure and Unions?

1193


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1067


Explain what is meant by 'bit masking'?

1134


What are file streams?

972


What is the newline escape sequence?

1026


What is a c token and types of c tokens?

1016