cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Question dealing with Array print comman
Question dealing with Array print commands
Oct 29, 2009 at 10:37am UTC
PBIRBAS
(17)
Need another small advice about following:
Could someone explain me what will happen if we have an Array of chars named str and this array doesn't contain the blank character (‘\0’) and try to execute the command: printf("%s", str); Can someone give an explanation please ?
Thanks in advance.....
Oct 29, 2009 at 10:50am UTC
screw
(145)
The printf instruction will print out the dirty data which are after the str. So it is rewarding to put '\0' at the end of your string
Topic archived. No new replies allowed.