Lesson 6 of 23

&&, ||, !, switch

9 min 25 XP

&& (AND) രണ്ട് വശവും true ആകുമ്പോൾ true, || (OR) ഏതെങ്കിലും ഒന്ന് ആകുമ്പോൾ, ! (NOT) condition തിരിച്ചിടുന്നു. Ternary operator condition ? a : b രണ്ട് values-ൽ ഒന്ന് തിരഞ്ഞെടുക്കുന്നു.

Example: edit me and press Run

Output Loading C (first time takes a few seconds)
Press Run to see the result here.

switch ഒരു value-യെ പല cases-മായി താരതമ്യം ചെയ്യുന്നു. ഓരോ case-ഉം break കൊണ്ട് അവസാനിപ്പിക്കൂ, അല്ലെങ്കിൽ execution അടുത്ത case-ലേക്ക് വഴുതിപ്പോകും.

Example: edit me and press Run

Output Loading C (first time takes a few seconds)
Press Run to see the result here.

Challenge

+25 XP

scanf(" %c", &ch) ഉപയോഗിച്ച് ഒരു അക്ഷരം വായിക്കൂ. a, e, i, o, u (ചെറുതോ capital-ഓ) ആണെങ്കിൽ "Vowel", അല്ലെങ്കിൽ "Consonant" print ചെയ്യൂ. switch ഉപയോഗിക്കൂ.

Output Loading C (first time takes a few seconds)
Press Run to see the result here.