+ 1

Solve and explain the answer i did not understand what's going on?

#include<stdio.h> #include<conio.h> int main() { clrscr(); int i=2; printf("%d,%d",++i,++i); getch(); return 0; }

14th Sep 2017, 12:18 PM
Xerox
Xerox - avatar
1 Odpowiedź
+ 7
firstly. conio.h no, just don't.. unless you're a time traveller that is, if so Welcome to the 21st century! https://en.m.wikipedia.org/wiki/Conio.h secondly printf; I assume this is where your confusion lay. try reading through this reference information, it may help. http://www.cplusplus.com/reference/cstdio/printf/ also here is information on prefix/postfix operators. http://en.cppreference.com/w/cpp/language/operator_incdec
14th Sep 2017, 12:25 PM
jay
jay - avatar