dimanche 6 novembre 2022

How the value of m is 2?

How the value of m is 2 after execution as i is postfix ?

int main()
{
   int i,m;
   int a[5]={8,10,1,14,16};
   i=++a[2];
   m=a[i++];
   cout<<i<<m;
   
   return 0;
}

Aucun commentaire:

Enregistrer un commentaire