Daily Quizzes
Mock Tests
Download MCQs Free PDF
Question
Computer Knowledge

Use of functions -

A) Enhances logical clarity of program

B) Makes debugging easier

C) Helps avoid repeating of statements 

Only (A) and (B) are correct 

Only (A) and (C) are correct

(A), (B), (C) are correct 

Only (C) is correct

फ़ंक्शंस का इस्तेमाल -

A) प्रोग्राम की लॉजिकल क्लैरिटी (तार्किक स्पष्टता) को बढ़ाता है

B) डीबगिंग को आसान बनाता है

C) स्टेटमेंट्स को बार-बार लिखने से बचने में मदद करता है

सिर्फ़ (A) और (B) सही हैं

सिर्फ़ (A) और (C) सही हैं

(A), (B), (C) सही हैं

सिर्फ़ (C) सही है

View Answer & Solution
Correct Answer: C ((A), (B), (C) are correct ) C ((A), (B), (C) सही हैं)
Detailed Solution:

Solution

The correct answer is (A), (B), (C) are correct 

Key Points

A) Enhances the logical clarity of programs:

    • Functions allow a programmer to segment large, complex programming tasks into smaller, more manageable subtasks.
    • When you put code into a function, you’re signaling to others that this is an important operation that we might want to use again.
    • It enhances readability and understanding of the code.

B) Makes debugging easier:

    • By breaking the program into functions, if an error occurs, you'll have a better idea of where to look.
    • The error is likely to be contained within the function that was just executed.
    • This makes your program easier to debug, since you don't have to understand the entire program at once.

C) Helps avoid repeating of statements:

    • Functions allow for reusability of code. Instead of repeating the same lines of code multiple times, you can encapsulate them into a function and call the function whenever those lines of code need to be executed again.
    • This reduces code repetition and makes the program more organized and efficient.

So, all A, B, C statements are correct regarding the use of functions in programming.

समाधान

सही जवाब है (A), (B), (C) सही हैं

मुख्य बातें

A) प्रोग्राम की लॉजिकल क्लैरिटी को बढ़ाता है:

o फ़ंक्शंस प्रोग्रामर को बड़े, जटिल प्रोग्रामिंग कार्यों को छोटे, आसानी से संभाले जा सकने वाले सब-टास्क्स में बांटने की सुविधा देते हैं।

o जब आप कोड को किसी फ़ंक्शन में डालते हैं, तो आप दूसरों को यह संकेत देते हैं कि यह एक महत्वपूर्ण ऑपरेशन है जिसे हम शायद दोबारा इस्तेमाल करना चाहें।

o यह कोड को पढ़ने और समझने में आसान बनाता है।

B) डीबगिंग को आसान बनाता है:

o प्रोग्राम को फ़ंक्शंस में बांटने से, अगर कोई एरर (त्रुटि) आती है, तो आपको बेहतर अंदाज़ा हो जाता है कि कहां देखना है।

o इस बात की संभावना होती है कि एरर उसी फ़ंक्शन के अंदर हो जिसे अभी-अभी चलाया गया था।

o इससे आपके प्रोग्राम को डीबग करना आसान हो जाता है, क्योंकि आपको एक ही बार में पूरे प्रोग्राम को समझने की ज़रूरत नहीं पड़ती।

C) स्टेटमेंट्स को बार-बार लिखने से बचने में मदद करता है:

o फ़ंक्शंस कोड के दोबारा इस्तेमाल (रीयूज़ेबिलिटी) की सुविधा देते हैं। कोड की उन्हीं लाइनों को कई बार दोहराने के बजाय, आप उन्हें एक फ़ंक्शन में रख सकते हैं और जब भी उन लाइनों को दोबारा चलाने की ज़रूरत हो, तो उस फ़ंक्शन को कॉल कर सकते हैं।

o इससे कोड का दोहराव कम होता है और प्रोग्राम ज़्यादा व्यवस्थित और कुशल बनता है।

इसलिए, प्रोग्रामिंग में फ़ंक्शंस के इस्तेमाल के संबंध में A, B, C सभी बातें सही हैं।

India’s #1 Learning Platform
Start Complete Exam Preparation
Daily Live MasterClasses
Practice Question Bank
Mock Tests & Quizzes
Trusted by 8.1 Crore+ Students

Exam Preparation Simplified

Learn Practice Analyse Improve
Get Started Free
Download the App

Trusted by 8.1 Crore+ Students

Enquire Now

Please share a few details to view the answer and solution.

×
Illustration of two people having a discussion

We're Here for You! Get in Touch with Class24 for All Your Needs!

Disclaimer: Your privacy is important to us. We will not share your information with third parties.