What "{}" and what "printf" is

389 5 2
                                        

The {} is a must after you put int main(void) and after a start of a loop. {} is the "limit" of that part of the program. If you get any error dealing with {} go to where it says. Ex. Expecting end } for 18.1. All it means is at the 18th line it has an { but not a corresponding } later in the program.

The printf function is part of cs50.h. It can be used for printing something that is hard coded, a number or a string of letters.
We will cover the numbers and strings of letters later. Hard coding is putting: printf("Hello, world"); you have to end any non-loop with a semicolon. It will be your friend or your enemy though it all.

Programming language "C"Where stories live. Discover now