Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Functions in C are easy! ๐Ÿ“ž
Play lesson

C tutorial for beginners โš™๏ธ - Functions in C are easy! ๐Ÿ“ž

4.0 (0)
13 learners

What you'll learn

This course includes

  • 6.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

#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; }

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere