Lets code a mad libs game with C programming! ๐Ÿ“– @BroCodez
Lets code a mad libs game with C programming! ๐Ÿ“–  @BroCodez
Uploaded March 2025 | Updated September 2026, 1 week ago
#coding #programming #cprogramming

This is a beginner's project to help you understand how to accept strings as user input.

// MAD LIBS GAME

char noun[50] = "";
char verb[50] = "";
char adjective1[50] = "";
char adjective2[50] = "";
char adjective3[50] = "";

printf("Enter an adjective (description): ");
fgets(adjective1, sizeof(adjective1), stdin);
adjective1[strlen(adjective1) - 1] = '\0';

printf("Enter a noun (animal or person): ");
fgets(noun, sizeof(noun), stdin);
noun[strlen(noun) - 1] = '\0';

printf("Enter an adjective (description): ");
fgets(adjective2, sizeof(adjective2), stdin);
adjective2[strlen(adjective2) - 1] = '\0';

printf("Enter a verb (ending w/ -ing): ");
fgets(verb, sizeof(verb), stdin);
verb[strlen(verb) - 1] = '\0';

printf("Enter an adjective (description): ");
fgets(adjective3, sizeof(adjective3), stdin);
adjective3[strlen(adjective3) - 1] = '\0';

printf("\nToday I went to a %s zoo.\n", adjective1);
printf("In an exhibit, I saw a %s.\n", noun);
printf("%s was %s and %s!\n", noun, adjective2, verb);
printf("I was %s!\n", adjective3);

return 0;
Lets code a mad libs game with C programming! ๐Ÿ“–C Programming Full Course for free โš™๏ธLearn octal in 113โ‚ˆ seconds #coding #computerscience #programmingJava Full Course for free โ˜•Build a music player with Python! ๐ŸŽถInitialize an array with user input in C โžก๏ธLets code a simple python calculator! ๐ŸงฎMongoDB collections explainedLearn C for loops in 6 minutes! ๐Ÿ”‚
Bro Code |

Let's code a mad libs game with C programming! ๐Ÿ“–

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER