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 is the size of enum in c?

1070


What are the different types of data structures in c?

1121


What is bubble sort in c?

1011


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

2723


Why we not create function inside function.

2148


What are the back slash character constants or escape sequence charactersavailable in c?

1139


Is c pass by value or reference?

1002


What are different types of variables in c?

1018


What is structure in c explain with example?

1107


What is d'n in c?

1079


Difference between linking and loading?

1067


What is a function simple definition?

1042


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

967


What is the meaning of typedef struct in c?

1012


Wt are the Buses in C Language

3165