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 is chain pointer in c?

1108


What is the purpose of void in c?

1107


What is a pointer variable in c language?

1151


Is return a keyword in c?

1146


Why is struct padding needed?

1156


write a program to rearrange the array such way that all even elements should come first and next come odd

2352


What is the main difference between calloc () and malloc ()?

1232


What is use of integral promotions in c?

1207


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

1213


Is null always equal to 0(zero)?

1097


How many data structures are there in c?

1168


A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor

1138


The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?

1261


Do you know the purpose of 'register' keyword?

1065


Mention four important string handling functions in c languages .

1156