Created
October 6, 2017 15:25
-
-
Save dimka11/38cfd34340f3f898d69ead12a8dedd50 to your computer and use it in GitHub Desktop.
Статический массив
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
int main() | |
{ | |
int mas [3] = { 1,2,3 }; | |
int b = 10; | |
mas [4] = b; | |
mas[5] = mas[2] + mas[4]; // 3 + 10 | |
std::cout << mas[0] + mas[1] + mas[2] << std::endl; // 6 | |
std::cout << mas[5]; // 13 | |
system("pause"); // Приложение падает. | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment