Playground
#include <iostream> #include <cstring> using namespace std; int main() { //ednodimenzionalna niza int arr[5]; memset(arr, 0, sizeof(arr)); //ok, arr={0,0,0,0,0} int mat[2][2]; memset(mat, -1, sizeof(mat)); //ok, mat={{-1,-1}, {-1,-1}} cout << arr[0] << endl; //pechati '0' return 0; }
Input data
Program output
no input
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!