2d array c++
int a[2][3]= {
{1, 2, 3},
{4, 5, 6}
};
cout << a[1][1]; // Output is 5
2d array c++
int a[2][3]= {
{1, 2, 3},
{4, 5, 6}
};
cout << a[1][1]; // Output is 5
multidimensional array c++
int MyArray[2][3] = { {2, 3, 4}, {12, 13, 14} };
//visualize
//2, 3, 4
//12, 13, 14
std::cout << MyArray[0][2] << endl; // 4
std::cout << MyArray[1][1] << endl; // 13
//First square bracket means how many rows you want in your array
//Second squire bracket is for how many qulam you want in your array
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us