Which language is better for writing structured code?

2023

Which language is better for writing structured code?

  1. A.

    PASCAL

  2. B.

    FORTRAN

  3. C.

    BASIC

  4. D.

    More than one of the above

  5. E.

    None of the above

Attempted by 388 students.

Show answer & explanation

Correct answer: A

PASCAL is designed with strong support for structured programming concepts like procedures, functions, and clear control structures. It enforces disciplined coding practices, making it suitable for writing structured code.

FORTRAN is primarily optimized for numerical and scientific computing. It lacks modern structured programming constructs, making it less suitable for general structured code development.

BASIC is a simple language with limited support for structured programming. It often relies on GOTO statements, which can lead to unstructured code.

Since only PASCAL supports structured programming among the given options, 'More than one of the above' is incorrect. Similarly, 'None of the above' is also incorrect because PASCAL fits the requirement.

हिन्दी उत्तर: पास्कल संरचित प्रोग्रामिंग अवधारणाओं जैसे प्रोसीजर, फंक्शन और स्पष्ट नियंत्रण संरचनाओं के साथ मजबूत समर्थन प्रदान करता है। यह अनुशासित कोडिंग अभ्यासों को बल देता है, जिससे यह संरचित कोड लिखने के लिए उपयुक्त है।

फोर्ट्रान मुख्य रूप से संख्यात्मक और वैज्ञानिक गणना के लिए अनुकूलित है। इसमें आधुनिक संरचित प्रोग्रामिंग निर्माणों की कमी है, जिससे यह सामान्य संरचित कोड विकास के लिए कम उपयुक्त है।

बेसिक एक सरल भाषा है जिसमें संरचित प्रोग्रामिंग के लिए सीमित समर्थन है। यह अक्सर GOTO स्टेटमेंट पर निर्भर करता है, जो असंरचित कोड का कारण बन सकता है।

चूँकि दिए गए विकल्पों में केवल पास्कल संरचित प्रोग्रामिंग का समर्थन करता है, इसलिए 'उपर्युक्त में से एक से अधिक' गलत है। इसी तरह, 'उपर्युक्त में से कोई नहीं' भी गलत है क्योंकि पास्कल आवश्यकता को पूरा करता है।

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs