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

Void

In C, there's a special type for function signatures: void. There are two primary ways you'll use void:

To explicitly state that a function takes no arguments:

int get_integer(void) {
    return 42;
}

When a function doesn't return anything:

void print_integer(int x) {
    printf("this is an int: %d", x);
}

It's important to note that void in C is not like None in Python. It's not a value that can be assigned to a variable. It's just a way to say that a function doesn't return anything or doesn't take any arguments.