Visual Studio Code – (C++) Visual Studio gives different outputs as other compilers for simple array sum problem
Code: #include <iostream> using namespace std; long ar[10]; int arraySize; long aVeryBigSum(long arr[]) { long total = 0; for (int x = 0; x < arraySize; x++) { total += ar[x]; } return total; } int main() { cin >>…