C++ (Qt)#include <iostream>using namespace std; int main() { int arr[20]; cout << sizeof(arr) / sizeof(int); return 0;}
C++ (Qt)int a = 10, b = 20;int* mas = new int[a][b];
C++ (Qt) int a = 10, b = 20; int** mas = new int*[a]; for (int i = 0; i < a; i++) { mas[i] = new int[b]; }
C++ (Qt)#include <vector>#include <iostream> using namespace std;typedef vector<int> ivec; int main(){ vector<ivec>mas(10, ivec(20)); mas[0][0] = 0; mas[0][1] = 5; cout << mas[0][0] << " " << mas[0][1]; return 0;}
C++ (Qt)#include <QVector>#include <QDebug> typedef QVector<int> ivec; int main(){ int a = 10, b = 20; QVector<ivec>mas(a, ivec(b)); mas[0][0] = 0; mas[0][1] = 5; qDebug() << mas[0][0] << " " << mas[0][1]; return 0;}