iOS-InterviewQuestion-collection icon indicating copy to clipboard operation
iOS-InterviewQuestion-collection copied to clipboard

第一个逻辑运算题答案

Open FulChou opened this issue 4 years ago • 2 comments

        int a=5,b;
        b = (++a)+(++a);
        System.out.println(b);

使用java验算了结果是13呀

FulChou avatar Apr 29 '20 07:04 FulChou

OC 的结果也是13,js的结果也是13 int a=5,b; b=(++a)+(++a);
NSLog(@"%d", b);

zlfyuan avatar Oct 23 '20 03:10 zlfyuan

C++的结果也是13 OC也是13 应该是搞错了
int a = 5,b; b = (++a) + (++a); cout<<b<<endl;

liangqian609 avatar Nov 17 '20 12:11 liangqian609