Jan 22, 2022

[c/c++] 1차원 배열 사용 | 1-D array


#include <iostream>

using namespace std;

int main()

{

int c_nums[3] = { 1, 2, 3 };

int size = sizeof(c_nums) / sizeof(int);


for (int i = 0; i < size; ++i)

{

cout << c_nums[i] << " ";

}

cout << endl;

}

No comments:

Post a Comment