07:44Switches in C are easy! 💡
From the creator
#coding #programming #cprogramming // switch = An alternative to using many if-else statements // More efficient w/ fixed integer values char dayOfWeek = '\0'; printf("Enter a day of the week (M, T, W, R, F, S, U): "); scanf("%c", &dayOfWeek); switch(dayOfWeek){ case 'M': printf("It is Monday"); break; case 'T': printf("It is Tuesday"); break; case 'W': printf("It is Wednesday"); break; case 'R': printf("It is Thursday"); break; case 'F': printf("It is Friday"); break; case 'S': printf("It is Saturday"); break; case 'U': printf("It is Sunday"); break; default: printf("Please only enter a character (M, T, W, R, F, S, U)"); } return 0;
Published 2025-03-06 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.
Keep exploring Learn to Code
07:44
11:14
09:48
10:30
15:34
8:56:30C Language Full Course Part 1 | Beginner to Advanced with 100+ Questions and Notes
College Wallah
42:31Part 1 | Introduction To Programming | C Programming Malayalam Tutorial
Brototype Malayalam