+ 1
I don't know why my code is rejected. Can anyone say why?
#include<iostream> using namespace std ; int main () {int i=20; cout<<i++<<i++<<i++; cout<<i; return 0; }
4 Respuestas
+ 11
Your quiz submission was rejected because multiple prefix/postfix operators used on a single variable between two sequence points will result in undefined behaviour.
https://stackoverflow.com/questions/4176328/undefined-behavior-and-sequence-points
+ 11
i wonder who is teaching ppl these methods. i mean even if this code didnt result in undefined behaviour, what possible usage would it have in a program?
+ 8
@Jay Obfuscation? :D
+ 2
The code is correct. Make sure you saved it as .cpp and not .c
Happened to me a few times in rush