Here is my code, I would need to fill in every element in the 2d array with the maximum size ( INT_MAX), however, my code was unable to work properly?
#include <iostream>
#include <string.h>
#include <limits.h>
using namespace std;
int main(){
int arr[10][10];
memset(arr,INT_MAX, sizeof (arr));
cout << arr[0][3];
//output = -1 instead of 2147483647
}
How do I modify my code such that I will be able to fill in an array with the max values?