
Patrick B. answered 09/20/20
Math and computer tutor/teacher
COMPILER ERRORS:
include is misspelled
main must return int
main takes only ZERO or arguments:
either do:
int main ( int argc, char ** argv)
or
int main()
line 9: you have print instead of printf
and that same statement is missing the semicolon;
line 11: What is it? should be inside double quotes
otherwise use a variable there instead
line 13: you have scan instead of scanf
line 15: you have printit instead of printf
That should bring this source code into a
compilable state
Now for the run-time bugs...
line 7 is ok, as it just prints 3 newlines
line 9 will output and behave unpredicatably because
you are asking printf to cram the entire string
"this program may do something" into a single
character
the same is true for line 11: you are trying to
format the string "What is it?" as a decimal, so
unpredictable output and behavior results
because you are passing a bogus address to scanf in
line 13, the result is unpredictable. Program MAY
crash. If it doesn't YOU'RE LUCKY!
The program mercifully ends with two new line
in lines 15 onwards