Functions in C++
What is a Function?
A function is a block of code that performs a specific task and can be reused.
google.com, pub-8434817042454839, DIRECT, f08c47fec0942fa0
Why Use Functions?
- Reusability
- Clean code
- Easy debugging
Example
#include<iostream>
using namespace std;
using namespace std;
void greet() {
cout << “Hello”;
}
int main() {
greet();
return 0;
}
Types of Functions
- Built-in functions
- User-defined functions

