0
Why is there error in this code ?
#include <iostream> using namespace std; int main() { int a = 2 ; a = a++; cout << a; return 0; }
1 Resposta
+ 1
There is not error in this code.
Although it will generate a warning regarding "a = a++" statement which may lead to undefined behaviour, but program will still run and generate output.