+ 2
What is the output?
#include <stdio.h> int main(){ int n; for(n=3;n!=0;n--) printf("n=%d",n--); return 0; }
13 Respostas
+ 18
3 2 1
+ 1
@ACE ,there is no need of int because the function didn't return anything
+ 1
@ACE even though your out put is wrong
+ 1
in the printf n is decrementing ,so the value didn't hit 0 ,so the loops runs infinite times
+ 1
yes write @moraji surati
0
the a above code is in c language that's why it don't need an int to return a value, in c basically main function work with void,so no error occur.
and the result is
n=3n=2n=1
0
output is
n=3
n=1
n=-1
because n-- is written twice.
0
https://code.sololearn.com/czUbAsTHBREu/?ref=app
check your self