Lesson 4 of 23

Operators మరియు Type Casting

9 min 20 XP

రెండు ints ను భాగిస్తే దశాంశ భాగం పోతుంది: 7 / 2 అంటే 3. % శేషాన్ని ఇస్తుంది: 7 % 2 అంటే 1. దశాంశ సమాధానం కావాలంటే (double) తో cast చేయండి.

Example: edit me and press Run

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

++i ముందుగా పెంచి తర్వాత value ఇస్తుంది; i++ పాత value ఇచ్చి తర్వాత పెంచుతుంది. చాలా ప్రసిద్ధ C interview ప్రశ్న.

Challenge

+20 XP

సెకన్ల సంఖ్యను చదివి దాన్ని hours:minutes:seconds గా print చేయండి. Input: 3725 → Output: 1:2:5

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