C - Programming Language
This course covers the basics of programming in C. Work your way through the videos/articles and I'll teach you everything you need to know to start your programming journey!
I'm starting a coding bootcamp
Want to learn web development in a fun and gamefied environment? Head over to simulator.dev and see what I'm working on!

Building A Mad Libs Game

Lesson 14
Author : Mike Dane
Last Updated : November, 2017


Copy// using fgets() instead of scanf()

char color[50];
char pluralNoun[50];
char celebrity[50];

printf("Enter color: ");
fgets(color, 50, stdin);

printf("Enter plural noun: ");
fgets(pluralNoun, 50, stdin);

printf("Enter celebrity: ");
fgets(celebrity, 50, stdin);

printf("Roses are %s \n", color);
printf("%s are blue \n", pluralNoun);
printf("I love %s \n", celebrity);