Lesson 6 of 23

&&, ||, ! மற்றும் switch

9 min 25 XP

&& (AND) இரண்டும் true ஆனால் true; || (OR) ஏதேனும் ஒன்று true ஆனால் true; ! (NOT) மாற்றும். ternary operator: condition ? a : b.

Example: edit me and press Run

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

switch ஒரு மதிப்பைப் பல case-களுடன் ஒப்பிடும். ஒவ்வொரு case முடிவிலும் break வேண்டும், இல்லையெனில் அடுத்த case-ம் இயங்கும் (fall-through).

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)), அது vowel (a e i o u, small அல்லது capital) ஆனால் "Vowel", இல்லையெனில் "Consonant" என்று print செய்யுங்கள். switch பயன்படுத்துங்கள்.

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