Quote:
What will be happen to the size of string in this code?
Nothing, what you store in a variable do not change its size.
1) Yes, it waste space, not a big problem.
2) C/C++ are unchecked, so you are responsible of taking care of this.
This lead to a problem called
buffer overflow Buffer overflow - Wikipedia, the free encyclopedia[
^]
The problem is avoided if you use managed languages.