Joined
Last Seen
0 Reputation Points
0% Quality Score
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 3
- Posts with Downvotes
- 1
- Downvoting Members
- 3
0 Endorsements
Ranked #72.8K
2 Posted Topics
Re: Hi, I Hope none of the above remarks would have solved your problem. I also actually faced this problem sometime ago. I think what you are missing is that after scanning string you are pressing either enter or space to take it as input. Next scanf("%s",&str2) will read that space … | |
Re: Hi, I guess answering your question requires some knowledge of how memory is allocated for constants and variables. Now let me answer your question one by one . 1. [CODE] char *ptr = "String"; char arr[]= "Array"; *str ='T'; // behaviour is undefined [/CODE] Now this surely is not allowed … |
The End.