+ 5
#include <iostream> using namespace std; int main() { int i=2; i=i++; cout<<"Result : " <<i++ + i++; return 0;}
#include <stdio.h> #include<conio.h> int main() { int i=2; i=i++; printf("Result : %d" ,i++ + i++); return 0; } output will be same or not ? if your answer yes or no, so tell me why ???
2 Respuestas
+ 1
I think that the output will be the same. std::cout works like printf, but it doesnt have the same formatting capabilities.
P.S. You don't have to write i=i++, just i++ will do the same.
+ 1
Reply