0

Why it is printing no output has a output?

#include <stdio.h> int main() { unsigned int i= 65000; while (i++!=0); printf ("%d",i); return 0; }

30th May 2021, 3:55 PM
Durga M
Durga M - avatar
3 Respostas
+ 1
In while loop u used semicolon and your loop working infinite times that's why next statement not printing write any other conditions like int i=1; while(i<20) Print i i++
30th May 2021, 4:20 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
#include <stdio.h> int main() { unsigned int i= 65000; if (i++!=0) { printf ("%d",i); return 0; } }
30th May 2021, 4:22 PM
Eashan Morajkar
Eashan Morajkar - avatar
+ 1
The code will print output if you run it outside SoloLearn. It doesn't give output in SoloLearn because the loop takes a significant amount of time (before it finishes), which violates the execution time limit.
31st May 2021, 2:53 AM
Ipang