This question already has answers here:
Why are these constructs using pre and post-increment undefined behavior?
                                
                                    (14个回答)
                                
                        
                                6年前关闭。
            
                    
int main()
{
    int b=0,a=1;//initialize a and b
    b=++a + ++a;// calculate assign the value of b
    print f("%d",b);
    return 0;
}



b的值是多少?
它的计算是什么?

最佳答案

这是。缺少Undefined Behaviour
有关更多信息,请参见sequence pointhere

关于c - int b = 0,a = 1; b =++ a +++ a; b的值是多少?它的计算是什么? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/18078385/

10-11 22:06