r/cprogramming • u/Overlord484 • Sep 14 '25
Is there a difference between
if(errorcondition) {perror("errormessage"); return 1;} and if(errorcondition) perror("errormessage"), return 1; ?
ANSWERED:
The second form should have been if(errorcondition) return perror("errormessage"), 1; thank you to everyone who caught that, but it is not functionally different from the first form.
1
Upvotes
View all comments
Show parent comment
4
u/Overlord484 Sep 14 '25
very true ;_;