Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

why a string cannot assigned to the another string

$
0
0
int main()
{
char str1[]="World",str2[]="Universe";
str1=str2;/*it will not work*/
}


today my professor taught me that we can't assign one string to another.I ask the question that it is possible to assign integer variable by another integer variable ,but why not we are able to do these in strings. But my professor told me that try to google it and find the answer. explain me..:confused:

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>