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.