Hi
Please have a look on the embedded questions in the code below. Thank you for all the help.
Code:// learning initialization.cpp #include <iostream> #include <cstdlib> #include <cstring> using namespace std; const int C = 20; int main() { char name[C] = {0}; // 10 zeroes int v = 10; cout << v << endl; v = 20; cout << v << endl; cout << name << endl; name[C] = {2} /* is this possible to re-initialize an array this way? one two and 9 zeroes */ system("pause"); return 0; }




Reply With Quote