About the use of printf in C++. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

About the use of printf in C++.

int a=-1; printf(''%d'', sizeof(a)); printf(''%d'', abs(a)); // can this line run well like the sec line?

26th Jul 2018, 11:38 AM
DiYiFan
DiYiFan - avatar
1 Answer
+ 3
you could've put the code into a compiler to save everyone time and find out yourself within a span of 3 seconds that yes, it does work.
26th Jul 2018, 11:53 AM
hinanawi
hinanawi - avatar