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


#include<stdio.h>
main()
{
char s1[]="Ramco";
char s2[]="Systems";
s1=s2;
printf("%s",s1);
}

what will happen if you executed this code?

Answers were Sorted based on User's Feedback



#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; ..

Answer / guest

error wud pop up because u cannot assign arrats or strings
to one another

Is This Answer Correct ?    5 Yes 0 No

#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; ..

Answer / ramesh

u will get error like incompatible types in assignment

Is This Answer Correct ?    5 Yes 0 No

#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; ..

Answer / mannucse

syste

Is This Answer Correct ?    1 Yes 3 No

#include<stdio.h> main() { char s1[]="Ramco"; char s2[]="Systems"; ..

Answer / sheetal

error will occur for l-value as left operand should be
pointer instead of array. Since assignment is always done
to pointer.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More C Interview Questions

write a programe returns the number of times the character appears in the string

2 Answers  


What is the hardest programming language?

0 Answers  


What is a pointer value and address in c?

0 Answers  


find second largest element in array w/o using sorting techniques? use onle one for loop.

15 Answers   BitWise, Zycus Infotech,


What is scope and lifetime of a variable in c?

0 Answers  


What is cohesion in c?

0 Answers  


How do I declare a pointer to an array?

6 Answers   IBM,


What character terminates all strings composed of character arrays? 1) 0 2) . 3) END

3 Answers  


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

3 Answers  


write a program that will read the temperature in Celsius and convert that into Fahrenheit.

1 Answers  


while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

0 Answers  


wht is the difference between KPO and BPO ?

2 Answers   Accenture, BPO, HCK, HCL, Infosys,


Categories