What will be the output of the following C code? please explain this code
#include <stdio.h>int main(){int x = 0;if (x == 1)if (x == 0)printf("inside if\n");elseprintf("inside else if\n");elseprintf("inside else\n");}
Thanks for contributing an answer!
\(........\)
Avoid writing here -
OUPUT WILL be
inside else
explaination x is declared as 0 in intitialiazation and
the first if condition says if x=1 then only execute inside this loop
but x=0 therefore it skips the loop
382 questions
257 answers
105 comments
155 users