Hello World, Again

So far, our programs have all had exactly one function in them, main. As we said, main is the entry point to our program. But main is also a boring function. It doesn’t take any parameters, and it doesn’t produce any result value (at least, not the way we’ve seen it so far).

We’re going to work on defining and calling new functions. Let’s rewrite our Hello World program, but this time using a basically useless helper function:

Get hands-on with 1000+ tech skills courses.