Functions in C are easy! π
#coding #programming #cprogramming void happyBirthday(char name[], int age){ printf("\nHappy birthday to you!"); printf("\nHappy birthday to you!")...

Bro Code
31.4K views β’ Mar 12, 2025

About this video
#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;
}
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;
}
Tags and Topics
Browse our collection to discover more content in these categories.
Video Information
Views
31.4K
Likes
860
Duration
9:57
Published
Mar 12, 2025
User Reviews
4.6
(6) Related Trending Topics
LIVE TRENDSRelated trending topics. Click any trend to explore more videos.
No specific trending topics match this video yet.
Explore All Trends