🎯 Funções em C

Em poucas palavras

Definição técnica ou simplificada do conceito.


📝 Notas e Desenvolvimento

Em C é possível definir suas próprias funções. Para fazer isso, use a seguinte sintaxe

void _myFunction_() {
	// code to be executed
}

Por exemplo:

// Create a function
void myFunction() {
	printf("I just got executed!");
}
 
int main() {
	myFunction(); // call the function
	return 0;
}
 
// Outputs "I just got executed!"

É importante notar que as funções devem estar na ordem de execução. No entanto, também é possível alterar a ordem em que as funções são executadas.

void myFunction();
 
int main() {
	myFunction(); // call the function
	return 0; }
 
//Create a function
void myFunction() {
	printf("I just got executed!");
}
 
// Outputs "I just got executed!"

🔗 Conexões e Contexto


📚 Referências e Fontes

Citações Diretas