+ 1

What is the output of this program?

#include<studio.h> int main() { for(function();function();function()) { printf("%d",function()); } } int function() { static int n = 13; return --n; }

11th Aug 2019, 11:37 PM
B Karthik Marimuthu
B Karthik Marimuthu - avatar
3 odpowiedzi
+ 2
First error, no <studio.h>, fixed that and got the code running into infinite loop. In Code Playground you most probably will get a time limit warning.
12th Aug 2019, 4:29 AM
Ipang
+ 3
It's an error from the start. variables and keywords are case sensitive, meaning "int" ≠ "Int"
11th Aug 2019, 11:41 PM
Dlite
Dlite - avatar
+ 2
Well noted... I have edited.. please check now
11th Aug 2019, 11:45 PM
B Karthik Marimuthu
B Karthik Marimuthu - avatar