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 / kapil kumar verma iimt meerut

when we declare array of char it has to be terminated by
null but termination by null in case of string is
automatic.the compiler automatically puts a null char when
we insert a string for example "kapil" for the
string "kapil\0", but for a char array we need assign a
place for it for example a[6] contains five char & a null
char.& secondly
when char array is read through scanf() input function then
spaces are not allowed if characters is read as string
(through gets() function) spaces are allowedand are treated
as a single char.

Is This Answer Correct ?    38 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does %p mean?

1087


Is there sort function in c?

1020


What are predefined functions in c?

1101


Why pointers are used?

1079


Explain about C function prototype?

1097


What is output redirection?

1223


Combinations of fibanocci prime series

1618


Write a program to generate random numbers in c?

1103


Explain the term printf() and scanf() used in c language?

1052


How do you list a file’s date and time?

1071


What is character set?

1172


How can I remove the leading spaces from a string?

1171


Explain what is wrong with this statement? Myname = ?robin?;

1589


What is nested structure with example?

1077


Is there any possibility to create customized header file with c programming language?

1065