We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Basic Types

  • int – An integer
  • float – A floating point number
  • char – A character
  • char * – An array of characters (more on this later... if you think about it, sounds kinda like a string doesn't it?)

You've already seen int in the example before – it's the return value in the special main function (the entry point for every C program).

When declaring a variable, you must specify its type before the name and assigning a value.

Assignment

Someone allowed a Pythonista into our beautiful C codebase!

Fix the bugs caused by missing types on lines 4, 5, and 6.

Tip

Here's the first variable for you:

int max_recursive_calls = 100;