What will be the output

+4 votes
asked Mar 22 by (160 points)
#include <stdio.h>

int main(void)

{

int sum = 15;

if ( sum > 20 )

}

else

{

sum = sum + 20;

}

print("value = %d \n" , sum);

return 0;

}

4 Answers

+1 vote
answered Mar 22 by (160 points)
The code is incorrect

after  if variable unwanted flower base is added
–1 vote
answered Mar 26 by (120 points)
I think you want to write this program

int main()
{ int sum = 15;
   if (sum > 20);
   else
           sum = sum + 20;
    Printed("value = %d\n",sum);
return 0;
}

You didn't specify what you need in if statement and no need to add braces after if else statements.
0 votes
answered Mar 31 by (140 points)
answer is 35
0 votes
answered 3 days ago by (260 points)
syntax error because if doesnt have a opening brace
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...