3 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for saurabh.mehta.33234

#include<stdio.h> void main() { int n=5; if(n==5?printf("Hallo"):printf("Hai"),printf("Bye")); } The output of the above code is HalloBye..But I am not able to debug it..I know that ternary has precedence over comma operator but i am stuck at which operand will go with which operator..Can someone please help

Member Avatar for Moschops
-1
236
Member Avatar for wildplace

let say i have an expression like the one below, I guess it goes from left to right? if(exp1 && (exp2 && exp3 || exp4) || exp5)

Member Avatar for wildplace
0
111
Member Avatar for Salem

This is a catalogue of some experiments on just two aspects of undefined behaviour. This was inspired by yet another long bout of explanation in a recent thread, so I thought it was time to dust off a bunch of compilers, and compare. This is the test code. [code] #include …

Member Avatar for frk
4
578

The End.