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

how to construct a simulator keeping the logical boolean gates in c

2251


What is #ifdef ? What is its application?

1103


What do you mean by command line argument?

1167


Can we add pointers together?

1054


What is the difference between struct and typedef struct in c?

1121


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

1106


What are qualifiers?

1042


What is the difference between test design and test case design?

2084


why do some people write if(0 == x) instead of if(x == 0)?

1066


Differentiate call by value and call by reference?

957


Explain how do I determine whether a character is numeric, alphabetic, and so on?

1129


c program to compute AREA under integral

2392


How can you call a function, given its name as a string?

1152


Where are local variables stored in c?

1035


What is a file descriptor in c?

1124