* coinjo:
Can i do this char array[40]=123; so that array[03]=1,array[1]=2, and
array[2]=3 is the result?
No.
Why did you not try it out before asking?
You can do
char a[40] = {123}; // a[0]=123, a[*]=0
char b[40] = {1,2,3}; // b[0]=1, b[1]=2, b[2]=3, b[*]=0
char c[40] = "123"; // c[0]='1', c[1]='2', c[2]='3', c[*]=0
But mostly, as a newbie, you shouldn't use raw arrays for anything.
Instead, use std::string and/or std::vector<char>.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?