Lesson 6 of 23
&&, ||, ! మరియు switch
9 min 25 XP
&& (AND) రెండు వైపులా true అయితే true, || (OR) ఏదో ఒకటి true అయితే, ! (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.