1 Programming Languages and Translators • Programming Basics प्रोग्राम में ऐसा नामित डेटा आइटम जिसका मान बदला जा सकता है, सामान्यतः क्या कहलाता है? What is a named data item whose value can change during a program generally called? A. चर Variable B. टिप्पणी Comment C. ऑपरेटर Operator D. कीवर्ड Keyword उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: A Correct Answer: A Variable डेटा को नाम के माध्यम से संदर्भित करने देता है। प्रोग्राम के निर्देश उसके मान को पढ़ या बदल सकते हैं। A variable allows data to be referenced by a name. Program instructions can read or change its value.
2 Programming Languages and Translators • Programming Basics प्रोग्रामिंग में constant का सामान्य अर्थ क्या है? What does a constant generally mean in programming? A. हर निर्देश पर बदलने वाला मान A value that changes after every instruction B. केवल फ़ाइल का नाम Only a filename C. किसी त्रुटि का संदेश An error message D. ऐसा निश्चित मान जिसे संबंधित प्रोग्राम संदर्भ में बदला नहीं जाता A fixed value that is not changed in the relevant program context उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: D Correct Answer: D Constant निश्चित मान दर्शाता है। इसके विपरीत, variable का मान प्रोग्राम के दौरान बदला जा सकता है। A constant represents a fixed value. In contrast, the value of a variable can change during a program.
3 Programming Languages and Translators • Programming Basics पूर्णांक जैसे 12, 0 और −7 रखने के लिए सामान्यतः किस data type का उपयोग होता है? Which data type is generally used to represent whole numbers such as 12, 0 and −7? A. String String B. Boolean Boolean C. Integer Integer D. Character Character उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: C Correct Answer: C Integer पूर्णांक मानों के लिए उपयोग होता है। इसमें भिन्नात्मक भाग नहीं होता; उपलब्ध मानों की सीमा भाषा और प्रकार पर निर्भर करती है। An integer represents whole-number values without a fractional part. The available range depends on the language and integer type.
4 Programming Languages and Translators • Programming Basics Boolean data type मुख्यतः किन दो तार्किक मानों को दर्शाता है? Which two logical values does the Boolean data type primarily represent? A. True और False True and False B. Positive और Negative Positive and Negative C. Uppercase और Lowercase Uppercase and Lowercase D. Input और Output Input and Output उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: A Correct Answer: A Boolean का उपयोग सत्य या असत्य स्थिति दर्शाने के लिए होता है। यह शर्तों और तार्किक निर्णयों में उपयोगी है। A Boolean represents a true or false condition. It is useful in conditions and logical decisions.
5 Programming Languages and Translators • Programming Basics C भाषा में assignment और equality comparison के ऑपरेटर क्रमशः कौन-से हैं? In C, which operators represent assignment and equality comparison, respectively? A. == और = == and = B. = और == = and == C. = और != = and != D. != और == != and == उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: B Correct Answer: B C में = किसी variable को मान देता है, जबकि == दो मानों की समानता जाँचता है। दोनों के बीच भ्रम से प्रोग्राम में त्रुटि हो सकती है। In C, = assigns a value, while == tests whether two values are equal. Confusing them can introduce a program defect.
6 Programming Languages and Translators • Programming Basics C भाषा में पूर्णांकों के लिए 17 % 5 का परिणाम क्या है? In C, what is the result of 17 % 5 for integer operands? A. 3 3 B. 3.4 3.4 C. 5 5 D. 2 2 उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: D Correct Answer: D % शेषफल देता है। 17 को 5 से भाग देने पर भागफल 3 और शेषफल 2 मिलता है। The % operator gives the remainder. Dividing 17 by 5 gives a quotient of 3 and a remainder of 2.
7 Programming Languages and Translators • Programming Basics Source code में सामान्य comments लिखने का प्रमुख उद्देश्य क्या है? What is the main purpose of ordinary comments in source code? A. हर गणना का परिणाम बदलना To change the result of every calculation B. प्रोसेसर की clock frequency बढ़ाना To increase processor clock frequency C. प्रोग्राम के उद्देश्य और तर्क को पाठक के लिए समझाना To explain the program purpose and logic to readers D. हर variable को constant में बदलना To convert every variable into a constant उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: C Correct Answer: C Comments कोड को समझने और बनाए रखने में सहायता करते हैं। सामान्य comments प्रोग्राम के निष्पादन योग्य निर्देश नहीं होते। Comments help readers understand and maintain code. Ordinary comments are not executable program instructions.
8 Programming Languages and Translators • Programming Basics C में एक ही प्रकार के कई मानों को एक नाम के अंतर्गत index से एक्सेस करने के लिए किसका उपयोग किया जाता है? In C, what is used to access multiple values of the same type under one name using an index? A. Array Array B. Comment Comment C. Keyword Keyword D. Operator Operator उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: A Correct Answer: A Array एक ही प्रकार के तत्वों का संग्रह है। प्रत्येक तत्व को उसके index से संदर्भित किया जा सकता है। An array is a collection of elements of the same type. Each element can be referenced using its index.
9 Programming Languages and Translators • Programming Basics एक ही कार्य करने वाले कोड को बार-बार लिखने के बजाय function में रखने का प्रमुख लाभ क्या है? What is a main benefit of placing code for a repeated task in a function instead of rewriting it each time? A. प्रोग्राम में सभी त्रुटियाँ अपने आप समाप्त हो जाती हैं All program errors are automatically eliminated B. कोड का पुनः उपयोग और रखरखाव आसान होता है Code reuse and maintenance become easier C. कंप्यूटर को ऑपरेटिंग सिस्टम की आवश्यकता नहीं रहती The computer no longer needs an operating system D. हर फ़ाइल का आकार हमेशा आधा हो जाता है Every file always becomes half its original size उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: B Correct Answer: B Function संबंधित कार्य को एक इकाई में संगठित करता है। आवश्यकता होने पर उसे दोबारा बुलाया जा सकता है, जिससे अनावश्यक दोहराव घटता है। A function organizes a task into a unit that can be called again when needed, reducing unnecessary code duplication.
10 Programming Languages and Translators • Programming Basics Flowchart में तीर वाली रेखाएँ मुख्यतः क्या दर्शाती हैं? What do arrowed lines primarily indicate in a flowchart? A. मेमोरी की कुल क्षमता Total memory capacity B. सभी variable के data types The data types of all variables C. प्रोग्राम की फ़ाइल का आकार The program file size D. चरणों के बीच नियंत्रण-प्रवाह की दिशा The direction of control flow between steps उत्तर और व्याख्या देखें Show answer and explanation सही उत्तर: D Correct Answer: D Flow lines चरणों को जोड़ती हैं और बताती हैं कि नियंत्रण किस दिशा में आगे बढ़ता है। निर्णय के बाद अलग शाखाएँ भी इन्हीं से दर्शाई जाती हैं। Flow lines connect steps and show the direction in which control proceeds. They also indicate branches following decisions.