// ConsoleApplication9.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include<iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int i=3;
int j=i+++i++;
int k=3;
int m=(k++)+(k++);
int p=3;
int q=p+(++p)++;
int x=3;
int y=++x+x++;
cout<<i<<" "<<j<<" "<<k<<" "<<m<<" "<<p<<" "<<q<<" "<<x<<" "<<y<<endl;//5 6 5 6 5 8 5 8
int a=-1,b=1;
if((++a)<0 && (--b)<=0)
cout<<b<<" "<<a<<endl;
else
cout<<b<<" "<<a<<endl;
//1 0 在一个“&&”表达式中,若“&&”的一端为0,则不必再计算另一端,该表达式的值为0,所以此时不再执行语句—b,即b的值为1.
int c[6]={1,2,3,4,5,6},*d,*g;
d=c;
g=c;
int e=*d++;
int f=(*d)++;
cout<<*g++<<" "<<(*g)++<<endl;//2 1
cout<<e<<" "<<f<<endl;//1 2
return 0;
}