पहले 10 प्रश्नों के उत्तर और हल यहीं खुले हैं; बाक़ी 11 के उत्तर और हल FliQi Question Bank app में।
भाषा
प्रश्न 1उत्तर + हल
दूसरी पीढ़ी (2nd Generation) की भाषा के साथ किस भाषा अनुवादक का उपयोग किया जाता है?
Which language translator is used with the 2nd Generation?
AकंपाइलरCompiler
Bइंटरप्रेटरInterpreter
Cकिसी अनुवादक की ज़रूरत नहींNo Translator
DअसेंबलरAssembler
सही उत्तर / Answer: (D)
हल / Solution
दूसरी पीढ़ी की भाषा असेंबली भाषा है। इसमें 0 और 1 की जगह ADD, MOV जैसे mnemonic कोड लिखे जाते हैं। कंप्यूटर इन्हें सीधे नहीं समझता, इसलिए असेंबलर इन्हें मशीन भाषा में बदलता है। 'किसी अनुवादक की ज़रूरत नहीं' पहली पीढ़ी, यानी मशीन भाषा, पर लागू होता है। कंपाइलर और इंटरप्रेटर तीसरी पीढ़ी की उच्च स्तरीय भाषाओं के लिए हैं। इसलिए सही उत्तर असेंबलर है।
The second generation language is assembly language. It uses mnemonic codes such as ADD and MOV in place of 0s and 1s. The computer cannot understand these directly, so an assembler converts them into machine language. 'No Translator' applies to the first generation, machine language. Compilers and interpreters are meant for third generation high level languages. So the answer is assembler.
प्रश्न 2उत्तर + हल
पहली पीढ़ी (1st Generation) की भाषा के लिए किस भाषा अनुवादक की ज़रूरत होती है?
Which language translator is needed for the 1st Generation?
AकंपाइलरCompiler
Bइंटरप्रेटरInterpreter
Cकिसी अनुवादक की ज़रूरत नहींNo Translator
DअसेंबलरAssembler
सही उत्तर / Answer: (C)
हल / Solution
पहली पीढ़ी की भाषा मशीन भाषा है, जो सीधे 0 और 1 में लिखी जाती है। कंप्यूटर इसे सीधे समझता और चलाता है, इसलिए कोई अनुवादक नहीं चाहिए। असेंबलर दूसरी पीढ़ी, यानी असेंबली भाषा, के लिए होता है। कंपाइलर और इंटरप्रेटर तीसरी पीढ़ी की उच्च स्तरीय भाषाओं, जैसे C, के लिए होते हैं। इसलिए सही उत्तर 'किसी अनुवादक की ज़रूरत नहीं' है।
The first generation language is machine language, written directly in 0s and 1s. The computer understands and runs it directly, so no translator is needed. An assembler is used for the second generation, that is, assembly language. Compilers and interpreters are used for third generation high level languages such as C. So the correct answer is 'No Translator', because nothing has to be converted.
प्रश्न 3उत्तर + हल
एक कंपाइलर है:
A compiler is:
Aएक प्रोग्राम जो प्रोग्राम को मेमोरी में रखता है और उन्हें निष्पादन के लिए तैयार करता हैA program that places programs into memory and prepares them for execution
Bएक प्रोग्राम जो असेंबली भाषा के मशीनी भाषा में अनुवाद को स्वचालित करता हैA program that automates the translation of assembly language into machine language
Cप्रोग्राम जो उच्च स्तरीय भाषा में लिखे गए प्रोग्राम को स्वीकार करता है और ऑब्जेक्ट प्रोग्राम तैयार करता हैProgram that accepts a program written in a high level language and produces an object program
Dएक प्रोग्राम जो स्रोत प्रोग्राम को ऐसे निष्पादित करता प्रतीत होता है मानो वह मशीन भाषा होIs a program that appears to execute a source program as if it were machine language
सही उत्तर / Answer: (C)
हल / Solution
कंपाइलर उच्च स्तरीय भाषा में लिखे सोर्स प्रोग्राम को लेता है और उससे ऑब्जेक्ट प्रोग्राम बनाता है। बाक़ी विकल्प दूसरे सिस्टम प्रोग्रामों के हैं। प्रोग्राम को मेमोरी में रखकर चलाने के लिए तैयार करना लोडर का काम है। असेंबली भाषा को मशीन भाषा में बदलना असेंबलर का काम है। सोर्स प्रोग्राम को ऐसे चलाना मानो वह मशीन भाषा हो, इंटरप्रेटर की पहचान है। इसलिए सही उत्तर विकल्प 3 है।
A compiler accepts a source program written in a high level language and produces an object program from it. The other options describe other system programs. Placing programs in memory and preparing them to run is the loader's job. Translating assembly language into machine language is the assembler's job. Running a source program as if it were machine language describes an interpreter. So option 3 is correct.
प्रश्न 4उत्तर + हल
वह कौन-सी भाषा है जिसे कंप्यूटर सीधे समझ सकता है?
Which is the language that the computer can understand directly?
Aउच्च स्तरीय भाषाHigh level language
Bअसेंबली भाषाAssembly language
Cमशीन भाषाMachine language
Dसिस्टम प्रोग्रामSystem program
सही उत्तर / Answer: (C)
हल / Solution
मशीन भाषा 0 और 1 यानी बाइनरी कोड में होती है। CPU इसी रूप में निर्देश पढ़कर चलाता है, इसलिए इसे किसी अनुवादक की ज़रूरत नहीं होती। उच्च स्तरीय भाषा को कंपाइलर या इंटरप्रेटर से बदलना पड़ता है। असेंबली भाषा को असेंबलर से बदलना पड़ता है। सिस्टम प्रोग्राम कोई भाषा नहीं, बल्कि सॉफ़्टवेयर का एक प्रकार है। इसलिए सही उत्तर मशीन भाषा है।
Machine language is written in binary code, that is, 0s and 1s. The CPU reads and runs instructions in this form, so no translator is needed. A high level language must be converted by a compiler or an interpreter. Assembly language must be converted by an assembler. A system program is not a language at all; it is a type of software. So the answer is machine language.
प्रश्न 5उत्तर + हल
उस अनुवादक को क्या कहते हैं जो उच्च स्तरीय भाषा के प्रोग्राम को इनपुट के रूप में लेता है और आउटपुट के रूप में मशीनी भाषा कोड तैयार करता है?
What do you call the translator which takes high level language program as input and produce machine language code as output?
AअसेंबलरAssembler
BकंपाइलरCompiler
Cइंटरप्रेटरInterpreter
DडिबगरDebugger
सही उत्तर / Answer: (B)
हल / Solution
कंपाइलर का इनपुट उच्च स्तरीय भाषा का सोर्स प्रोग्राम होता है और आउटपुट मशीनी भाषा का कोड, यानी ऑब्जेक्ट प्रोग्राम। यह आउटपुट अलग फ़ाइल में बचता है और बार-बार चलाया जा सकता है। इंटरप्रेटर भी उच्च स्तरीय भाषा लेता है, पर वह हर पंक्ति को सीधे चला देता है और कोई मशीन कोड फ़ाइल नहीं देता। असेंबलर का इनपुट असेंबली भाषा है। डिबगर अनुवादक ही नहीं है।
A compiler takes a high level source program as input and gives machine language code, the object program, as output. This output is saved as a separate file and can be run many times. An interpreter also takes a high level program, but it runs each line directly and gives no machine code file. An assembler takes assembly language as input. A debugger is not a translator at all.
प्रश्न 6उत्तर + हल
कौन-सा ट्रांसलेटर एक बार में एक पंक्ति का अनुवाद करता है?
Which translator translates one line at a time?
Aइंटरप्रेटरInterpreter
Bट्रांसलेटरTranslator
CकंपाइलरCompiler
DअसेंबलरAssembler
सही उत्तर / Answer: (A)
हल / Solution
इंटरप्रेटर प्रोग्राम की एक पंक्ति लेता है, उसका अनुवाद करता है और तुरंत चला देता है। फिर अगली पंक्ति पर जाता है। इसी वजह से त्रुटि वाली पंक्ति पर वह तुरंत रुक जाता है। कंपाइलर पूरे प्रोग्राम का एक साथ अनुवाद करता है। असेंबलर असेंबली भाषा को मशीन कोड में बदलता है। 'ट्रांसलेटर' इन सबका सामान्य नाम है, किसी एक का नहीं। इसलिए सही उत्तर इंटरप्रेटर है।
An interpreter takes one line of the program, translates it and runs it at once. Then it moves to the next line. That is why it stops right at the line that has an error. A compiler translates the whole program together. An assembler converts assembly language into machine code. 'Translator' is the general name for all of these, not one specific tool. So the answer is interpreter.
प्रश्न 7उत्तर + हल
रन टाइम (run time) त्रुटियों को खोजना और हल करना कहलाता है…
Finding and solving run time errors is…
ACompiling
Bdebugging
CAssembling
DTranslating
सही उत्तर / Answer: (B)
हल / Solution
प्रोग्राम की त्रुटियाँ खोजकर उन्हें दूर करने की प्रक्रिया डिबगिंग (debugging) कहलाती है, और रन टाइम त्रुटियों में तो यही एक रास्ता है, क्योंकि वे चलाने पर ही सामने आती हैं। संकलन (Compiling) स्रोत कोड को मशीनी कोड में बदलता है, असेंबलिंग (Assembling) असेंबली कोड को, और अनुवाद (Translating) इन दोनों का सामान्य नाम है — इनमें से कोई त्रुटि दूर नहीं करता।
The process of locating errors in a program and removing them is called debugging. For run time errors this is the only way, because such errors show up only while the program is running. Compiling changes source code into machine code and assembling does the same for assembly code, while translating is just the general name for both. None of these three removes an error by itself.
प्रश्न 8उत्तर + हल
असेंबली कोड को ऑब्जेक्ट कोड में अनुवाद करने की ज़िम्मेदारी किसकी है?
The responsibility to translate the Assembly code into object code is:
AलिंकरLinker
BअसेंबलरAssembler
CकंपाइलरCompiler
Dइंटरप्रेटरInterpreter
सही उत्तर / Answer: (B)
हल / Solution
असेंबलर असेंबली कोड को ऑब्जेक्ट कोड, यानी मशीन कोड, में बदलता है। C में भी कंपाइलर पहले असेंबली कोड बनाता है और फिर असेंबलर उससे .o या .obj फ़ाइल बनाता है। लिंकर इन ऑब्जेक्ट फ़ाइलों को जोड़ता है, अनुवाद नहीं करता। कंपाइलर उच्च स्तरीय भाषा को बदलता है। इंटरप्रेटर उच्च स्तरीय कोड को पंक्ति-दर-पंक्ति चलाता है। इसलिए सही उत्तर असेंबलर है।
An assembler converts assembly code into object code, that is, machine code. In C too, the compiler first produces assembly code, and the assembler then makes the .o or .obj file from it. A linker joins these object files; it does not translate them. A compiler translates a high level language. An interpreter runs high level code line by line. So the answer is assembler.
प्रश्न 9उत्तर + हल
कंपाइलर का कौन-सा भाग व्याकरण (grammar) की अवधारणा का सबसे अधिक उपयोग करता है?
Which part of the compiler highly uses the grammar concept?
Aकोड ऑप्टिमाइज़ेशनCode optimization
Bकोड जनरेशनCode generation
Cपार्सरParser
Dलेक्सिकल एनालिसिसLexical Analysis
सही उत्तर / Answer: (C)
हल / Solution
पार्सर कंपाइलर का सिंटैक्स एनालिसिस वाला भाग है। यह भाषा के व्याकरण, यानी context-free grammar, के नियमों से जाँचता है कि टोकन सही क्रम में आए हैं या नहीं। फिर यह parse tree बनाता है। लेक्सिकल एनालिसिस सिर्फ़ अक्षरों को टोकन में तोड़ता है और regular expression से काम चलाता है। कोड ऑप्टिमाइज़ेशन और कोड जनरेशन पार्सिंग के बाद आते हैं। इसलिए सही उत्तर पार्सर है।
The parser is the syntax analysis phase of a compiler. It uses the rules of the language grammar, a context-free grammar, to check whether the tokens come in a valid order. Then it builds a parse tree. Lexical analysis only breaks characters into tokens and works with regular expressions. Code optimization and code generation come after parsing. So the correct answer is parser.
प्रश्न 10उत्तर + हल
C language में एक प्रोग्राम को कौन मशीन भाषा में बदलता है?
Who converts a program into machine language in C language?
AकंपाइलरCompiler
Bसर्वरServer
CएडिटरEditor
Dये सभीAll of these
सही उत्तर / Answer: (A)
हल / Solution
C एक उच्च स्तरीय भाषा है। इसके सोर्स कोड को कंप्यूटर सीधे नहीं समझता। कंपाइलर, जैसे GCC या Turbo C, पूरे C प्रोग्राम को मशीन भाषा में बदलता है। एडिटर का काम सिर्फ़ प्रोग्राम लिखना और बदलना है। सर्वर नेटवर्क पर दूसरे कंप्यूटरों को सेवा देने वाला कंप्यूटर है। ये दोनों अनुवाद नहीं करते, इसलिए 'ये सभी' भी ग़लत है। सही उत्तर कंपाइलर है।
C is a high level language, so the computer cannot understand its source code directly. A compiler, such as GCC or Turbo C, converts the whole C program into machine language. An editor is only used to type and change the program. A server is a computer that gives services to other computers on a network. Neither of them translates code, so 'All of these' is wrong. The answer is compiler.
आगे के 11 प्रश्नों के उत्तर और हल app मेंFliQi Question Bank — अभ्यास, हल और आपकी प्रगति
Aनिष्पादन (execution) के लिए प्रोग्राम को मेमोरी में रखता हैPlaces the program in the memory for the purpose of execution
Bप्रोग्राम को उसे दिए गए ख़ास मेमोरी क्षेत्र से चलने के लिए स्थानांतरित (relocate) करता हैRelocates the program to execute from the specific memory area allocated to it
Cप्रोग्राम को उसके निष्पादन के लिए ज़रूरी दूसरे प्रोग्रामों से जोड़ता हैLinks the program with other programs needed for its execution
Aमशीन भाषा में प्रयुक्त बाइनरी संख्याओं के स्थान पर अक्षर-आधारित (alphabetic) कोड का उपयोग करती हैUses alphabetic codes in place of binary numbers used in machine language
Bप्रोग्राम लिखने की सबसे आसान भाषा हैIs the easiest language to write programs