Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

What will be the output

+3 votes
asked Mar 22, 2020 by Vidhura Rathnayake (150 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

+2 votes
answered Mar 22, 2020 by Dev Ganesh (180 points)
The code is incorrect

after  if variable unwanted flower base is added
0 votes
answered Mar 26, 2020 by GURINDER SINGH (140 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, 2020 by Sanath Sanath (140 points)
answer is 35
0 votes
answered Apr 6, 2020 by 1916114 (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.
...