Consider the following code
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int n, i, j, max1 = -1000000000, max2 = -1000000000;
cin >> n;
long long int a[n];
for (i = 0; i < n; i++)
{
cin >> a[i];
if (a[i] > max1)
max1 = a[i];
j = i;
}
for (i = 0; i < n; i++)
{
if (a[i] > max2 && i != j)
max2 = a[i];
}
cout << max1*max2;
}
Suppose max1=3
,max2=6
then the last line of the program outputs '18on terminal ; we have not used any variable to store the result of this multiplication operation ,then where is '18
stored before being printed on screen. Is a new variable created by the compiler at compile time to store this value?