07:31Functions in C are easy! 📞
From the creator
#coding #programming #cprogramming void happyBirthday(char name[], int age){ printf("\nHappy birthday to you!"); printf("\nHappy birthday to you!"); printf("\nHappy birthday dear %s!", name); printf("\nHappy birthday to you!"); printf("\nYou are %d years old!\n", age); } int main() { // function = A reusable section of code that can be invoked "called" // Arguments can be sent to a function so that it can use them char name[50] = ""; int age = 0; printf("Enter your name: "); fgets(name, sizeof(name), stdin); name[strlen(name) - 1] = '\0'; printf("Enter your age: "); scanf("%d", &age); happyBirthday(name, age); return 0; }
Published 2025-03-12 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





