// practice 1.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include<vector>
usingnamespace std;
int main()
{
int i=1;
int j=2;
i=++j;
j=i++;
cout<<i<<j<<endl;
}
Hello all,I am new to c++,I just have a small query when i tried to cout the result it giving 4 and 3.But actually it has to give 3 and 3 right ?
ya as you said,here in case of i =3 because j is increased to 3 as original value of j is 2.And i=3 because the copy of original value is 3 right ? please help me.