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.