Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Declaration | Functions
Oefenen
Projecten
Quizzen & Uitdagingen
Quizzen
Uitdagingen
/
C++ Intermediate | Mobile-Friendly

bookDeclaration

Veeg om het menu te tonen

For the cat, the function sound() declaration and call will look:

#include <iostream>
using namespace std;

// Function declaration
void sound() {
    cout << "meow!" << endl;
}

int main() {
    // Call the function to be executed 
    sound();

    return 0;
}

Remember:

  • you have to declare a function before calling it.
  • you can declare the function as many times as you want.

You have met functions at the beginning of your C++ programming path. main() - is the pre-defined function that is used to execute the code.

1. You have to...

2. Every program in c++ contains the function:

question mark

You have to...

Selecteer het correcte antwoord

question mark

Every program in c++ contains the function:

Selecteer het correcte antwoord

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 4. Hoofdstuk 2

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

Sectie 4. Hoofdstuk 2
some-alt