Playground
#include <iostream> using namespace std; int main() { int arr[10] = {1, 2, 3, 4, 5}; //izlez: '1 2 3 4 5 0 0 0 0 0' for (int i=0; i<10; i++) cout << arr[i] << " "; cout << endl; double niza[] = {10.0, 15.0, 20.0, 25.0, 30.0}; cout << sizeof(niza) << endl; //pechati '40' (5 * 8) cout << (sizeof(niza)/sizeof(niza[0])); //pechati '5' return 0; }
Input data
Program output
no input
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!