What are the values assigned to these index (arr[0], arr[1], arr[2], arr[3]) of the following code:
#include<iostream>
using namespace std;
int main()
{
int arr[4];
if(i%2==0)
arr[i]=2*i;
else
arr[i]=i;
return 0;
}
For the answer with explanation that how it worked CLICK HERE.
0,1,4,3
ReplyDelete