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

Go through the following code sinippet
char a[20];
a="Hello Orcale Test";
will this compile?

Answer Posted / vignesh1988i

the above variable 'a' is a character array , so i would not been wrong if it has been initilized on the same line.....
but they have done that in the next line , there lies the mistake... THIS PROGRAM WILL GIVE AN ERROR why because we cant copy the entire string in a single travel by using '='(assignment) operator unless it's an initilization directly/.....


thank u

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the functions to open and close file in c language?

1144


What happens if you free a pointer twice?

1033


How can I pad a string to a known length?

985


What is the difference between array and linked list in c?

1098


What is static volatile in c?

984


What are the c keywords?

1159


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

1086


What is the use of parallelize in spark?

987


What is the difference between struct and union in C?

1257


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

1032


Is there a way to switch on strings?

1037


What is the use of clrscr?

1061


How a string is stored in c?

1028


what is the structure pointer?

2083


Can a variable be both const and volatile?

1084