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
charcter arrays
charcter arrays
Jun 10, 2014 at 8:19am UTC
chofs
(49)
hey guys just wanted to ask a simple question to be sure...how many bytes are in the following character array....thanx in advance
char
mystr[]=
"Good morning!"
;
Jun 10, 2014 at 8:25am UTC
mutexe
(2372)
hiya.
http://en.cppreference.com/w/cpp/language/sizeof
Jun 10, 2014 at 8:35am UTC
chofs
(49)
thanx so can i say dat my char array is 14 bytes or 13 in this question
Jun 10, 2014 at 8:39am UTC
MiiNiPaa
(8886)
Your array contains 14 characters: 13 letters + trailing zero. As char is defined to be 1 byte in size, you can say your array is 14 bytes in size.
Topic archived. No new replies allowed.