Lesson 3 of 23
scanf() से Input पढ़ना
8 min 20 XP
scanf() user से values पढ़ता है। Variable के नाम से पहले & (address-of) लगाएँ ताकि scanf उसमें लिख सके। double पढ़ने के लिए %lf लें।
Example: edit me and press Run
Output Loading C (first time takes a few seconds)
Press Run to see the result here.Example: edit me and press Run
Output Loading C (first time takes a few seconds)
Press Run to see the result here.String (char array) पढ़ने में & नहीं लगता, क्योंकि array का नाम पहले से ही एक address है। %s सिर्फ़ एक शब्द पढ़ता है, space तक।