Skip to content

Instantly share code, notes, and snippets.

@dimka11
Created October 6, 2017 15:25
Show Gist options
  • Save dimka11/38cfd34340f3f898d69ead12a8dedd50 to your computer and use it in GitHub Desktop.
Save dimka11/38cfd34340f3f898d69ead12a8dedd50 to your computer and use it in GitHub Desktop.
Статический массив
#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