0 votes 0 votes why this program given run time error #include<stdio.h> int main ( ) { int x = 2, y = 5; if (x < y) return (x = x+y); else printf(“%d “,x); printf(“%d”,y); } https://ideone.com/AqYv40 Programming in C programming-in-c easy + – Gurdeep Saini asked Jan 23, 2019 • edited Feb 25, 2019 by Gurdeep Saini Gurdeep Saini 353 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Hemanth_13 commented Jan 23, 2019 reply Follow Share Its because you are returning non zero value, which I think is not accepted 0 votes 0 votes prashant jha 1 commented Jan 23, 2019 reply Follow Share 0 is the exit code returned by main , to indicate program termination. I think this is the reason . If you replace '=' with '==' there , then it'll run https://stackoverflow.com/questions/204476/what-should-main-return-in-c-and-c 0 votes 0 votes Gurdeep Saini commented Feb 25, 2019 reply Follow Share after doing change .it still giving run time error https://ideone.com/BzIVok 0 votes 0 votes Please log in or register to add a comment.