A parameter is how you pass data into a function. If you want a function to be reusable, it's better to use parameters instead of hard-coded values.
c
#include <stdio.h>
void greet(char name[], int age) {
printf("Hello %s, age %d
", name, age);
}
int main() {
greet("Sai", 20);
greet("Nandar", 22);
return 0;
}greet() function accepts two parameters — name and age. Passing different values when you call the function produces different output.
You should see
Hello Sai, age 20 Hello Nandar, age 22Info
Make sure the argument types you pass match the parameter types.