पहले 10 प्रश्नों के उत्तर और हल यहीं खुले हैं; बाक़ी 20 के उत्तर और हल FliQi Question Bank app में।
भाषा
प्रश्न 1उत्तर + हल
निम्नलिखित में से कौन सा जावा का सही लाभ है?
Which of the following are correct advantages of Java?
Aजावा सरल हैJava is simple
Bजावा सुरक्षित हैJava is secure
Cजावा पोर्टेबल हैJava is portable
Dउपरोक्त सभीAll of the above
सही उत्तर / Answer: (D)
हल / Solution
सरल, सुरक्षित और पोर्टेबल, ये तीनों उन विशेषताओं में गिने जाते हैं जिन्हें Sun ने जावा के परिचय में गिनाया था। जावा सरल इसलिए है कि इसमें pointer और बहु-उत्तराधिकार रखे ही नहीं गए। सुरक्षित इसलिए कि JVM चलाने से पहले bytecode की जाँच करता है। पोर्टेबल इसलिए कि वही bytecode हर मशीन पर चल जाता है। तीनों बातें सही हैं, इसलिए चौथा विकल्प सही है।
Simple, secure and portable are three of the buzzwords Sun used while describing Java. It is simple because pointers and multiple inheritance were deliberately left out. It is secure because the JVM verifies bytecode before running it. It is portable because the same bytecode runs on every machine that has a JVM. All three are true, so option four is correct.
प्रश्न 2उत्तर + हल
जावा एक ________ प्रोग्रामिंग भाषा है।
Java is a ________ programming language.
Aउच्च स्तरीयHigh-level
Bमध्य स्तरीयMiddle-level
Cनिम्न स्तरीयLow-level
Dउपरोक्त में से कोई नहींNone of the above
सही उत्तर / Answer: (A)
हल / Solution
जावा के प्रोग्राम अंग्रेज़ी से मिलती-जुलती शब्दावली में लिखे जाते हैं और लिखने वाले को register, मेमोरी के पते या मशीन की बनावट के बारे में सोचना नहीं पड़ता। ऐसी भाषा को उच्च स्तरीय कहा जाता है। असेम्बली निम्न स्तरीय भाषा है, जो सीधे हार्डवेयर से जुड़ी रहती है। C को अक्सर मध्य स्तरीय कहते हैं, क्योंकि वह pointer के ज़रिए मेमोरी तक भी पहुँच जाती है।
Java is written in words close to English, and the programmer does not have to think about registers, memory addresses or the machine itself. Such a language is called high level. Assembly is a low level language tied closely to the hardware, and C is often called middle level because it can also reach memory directly through pointers.
प्रश्न 3उत्तर + हल
जावा किस प्रकार की भाषा है?
Which kind of language is Java?
Aऑब्जेक्ट ओरिएंटेडObject oriented
Bप्रोसीजरलProcedural
Cइवेंट ड्रिवनEvent driven
Dइनमें से कोई नहींNone of these
सही उत्तर / Answer: (A)
हल / Solution
जावा में हर कोड किसी class के भीतर ही लिखा जाता है और काम object के ज़रिए होता है। inheritance, polymorphism और encapsulation जैसी बातें इस भाषा में शुरू से मौजूद हैं, इसलिए इसे ऑब्जेक्ट ओरिएंटेड कहा जाता है। C जैसी भाषाएँ procedural होती हैं, जहाँ प्रोग्राम function से बनता है। इवेंट ड्रिवन तो लिखने की एक शैली है, भाषा का स्वभाव नहीं। इसलिए पहला विकल्प सही है।
In Java every piece of code lives inside a class, and the work is done through objects. Features like inheritance, polymorphism and encapsulation are built into the language, so Java is called object oriented. C is a procedural language, where a program is made of functions. Event driven describes only a style of programming, not the nature of the language itself.
प्रश्न 4उत्तर + हल
OAK का नाम बदलकर Java क्यों किया गया?
Why was OAK renamed to Java?
Aक्योंकि भाषा असफल रही, इसलिए उन्होंने दूसरा रूप बनाकर उसका नाम Java रख दियाbecause the language was unsuccessful, so they created another version and changed its name to Java
Bक्योंकि वह नाम उनकी बनाई भाषा से मेल नहीं खाता थाbecause the name was not relevant to the language they created
Cक्योंकि Oak नाम की एक और भाषा पहले से मौजूद थीbecause there was another language called Oak
Dइनमें से कोई नहींNone of these
सही उत्तर / Answer: (C)
हल / Solution
Gosling ने खिड़की के बाहर खड़े पेड़ को देखकर भाषा का नाम Oak रखा था। बाद में पता चला कि यह नाम पहले से लिया जा चुका है और उस पर दूसरे का हक़ दर्ज है, इसलिए क़ानूनी कारण से उसे रखा नहीं जा सका। सन् 1995 में नया नाम Java चुना गया। भाषा असफल कभी नहीं हुई और पुराना नाम बेमेल भी नहीं था, इसलिए तीसरा विकल्प ही सही कारण बताता है।
Gosling named the language Oak after a tree outside his window. Later the team found that the name Oak was already taken and registered by someone else, so it could not be kept for legal reasons. In 1995 the name was changed to Java. The language was never unsuccessful and the old name suited it well, so the third option gives the right reason.
प्रश्न 5उत्तर + हल
जावा को किसके द्वारा डिज़ाइन किया गया था?
Java was designed by _________.
AMicrosoft
BMozilla Corporation
CSun Microsystems
DAmazon Inc.
सही उत्तर / Answer: (C)
हल / Solution
जावा को Sun Microsystems में James Gosling के नेतृत्व वाली टीम ने डिज़ाइन किया था और यह काम सन् 1991 में शुरू हुआ। Microsoft, Windows और C# भाषा बनाती है। Mozilla की पहचान Firefox ब्राउज़र से है। Amazon मुख्य रूप से ख़रीद-बिक्री और cloud सेवा की कंपनी है। इन तीनों में से किसी ने जावा नहीं बनाई, इसलिए सही उत्तर Sun Microsystems है, जिसे बाद में Oracle ने ख़रीद लिया।
Java was designed at Sun Microsystems by a team led by James Gosling, and the work began in 1991. Microsoft makes Windows and the C sharp language, Mozilla is known for the Firefox browser, and Amazon is mainly a shopping and cloud company. None of these three created Java, so Sun Microsystems is the correct answer, later bought by Oracle.
प्रश्न 6उत्तर + हल
जावा सोर्स प्रोग्राम की फ़ाइल का extension क्या होता है?
What is the file name extension of a Java source program?
A.j
B.ja
C.java
D.jax
सही उत्तर / Answer: (C)
हल / Solution
जावा का हर सोर्स प्रोग्राम ऐसी फ़ाइल में रखा जाता है जिसका नाम .java पर ख़त्म हो, जैसे Hello.java। compiler javac इसी फ़ाइल को पढ़कर Hello.class बनाता है, जिसमें bytecode रहता है। फ़ाइल का नाम उसके public class से मिलना भी ज़रूरी है, वरना compile नहीं होगा। बाक़ी तीन रूप .j, .ja और .jax जावा में काम ही नहीं आते, इसलिए तीसरा विकल्प सही है।
Every Java source program is stored in a file whose name ends with .java, for example Hello.java. The compiler javac reads this file and produces Hello.class, which holds the bytecode. The file name must also match the public class inside it, otherwise compiling fails. The other three forms, .j, .ja and .jax, are never used by Java at all.
प्रश्न 7उत्तर + हल
कंपाइलर क्या है?
What is a compiler?
Aकंपाइलर सभी निर्देशों को एक साथ बदलता हैA compiler converts all instructions in one go
Bकंपाइलर source code को निम्न-स्तरीय कोड में बदलता हैA compiler converts source code to low level code
Cकंपाइलर से बना प्रोग्राम तेज़ चलता हैCompilers work fast
Dउपरोक्त सभीAll the above
सही उत्तर / Answer: (D)
हल / Solution
कंपाइलर पूरे प्रोग्राम को एक साथ पढ़ता है और चलाने से पहले ही उसे निम्न-स्तरीय कोड में बदल देता है। अनुवाद पहले ही पूरा हो जाने के कारण प्रोग्राम फिर तेज़ी से चलता है। तीनों कथन सही हैं, इसलिए चौथा विकल्प ठीक है। इंटरप्रेटर से भेद याद रखिए, वह एक-एक पंक्ति बदलकर चलाता है और इसीलिए धीमा रहता है। जावा में javac यही काम करता है।
A compiler reads the whole program at once and turns all of it into low level code before anything runs. Since the translation is finished beforehand, the program then runs fast. All three statements are true, so option four is correct. Note the difference from an interpreter, which translates and runs one line at a time and therefore stays slower.
प्रश्न 8उत्तर + हल
इंटरप्रेटर क्या है?
What is an interpreter?
Aइंटरप्रेटर निर्देशों को एक-एक पंक्ति करके बदलता हैAn interpreter converts instructions line by line
Bइंटरप्रेटर source code को निम्न-स्तरीय कोड में बदलता हैAn interpreter converts source code to low level code
Cइंटरप्रेटर से प्रोग्राम धीमा चलता हैInterpreters are slow to execute
Dउपरोक्त सभीAll the above
सही उत्तर / Answer: (D)
हल / Solution
इंटरप्रेटर source code को एक-एक पंक्ति करके लेता है, उस पंक्ति को निम्न-स्तरीय कोड में बदलता है और उसी समय चला देता है। यही काम हर पंक्ति पर दोहराना पड़ता है, इसलिए compiler की तुलना में प्रोग्राम धीमा चलता है। पर ग़लती तुरंत पकड़ में आ जाती है, यह इसका लाभ है। तीनों कथन इंटरप्रेटर पर सही बैठते हैं, इसलिए उन सबको समेटने वाला चौथा विकल्प ही सही उत्तर है।
An interpreter takes the source code one line at a time, turns that line into low level code and runs it at once. Because this work is repeated for every single line, execution is slower than with a compiler, though errors show up immediately. All three statements are true about an interpreter, so the fourth choice, which covers them together, is the correct answer.
प्रश्न 9उत्तर + हल
एक्ज़ीक्यूटेबल सॉफ़्टवेयर (EXE फ़ाइलें) बनाने में क्या समस्या आती है?
What is the problem with generating executable software (EXE files)?
Aये सिर्फ़ Windows मशीनों पर चलती हैंThey run only on Windows machines
BLinux और Unix को .EXE से अलग रूप चाहिए होता हैLinux and Unix expect a different executable format than .EXE
Cचलने योग्य फ़ाइल पाने के लिए हर मशीन और processor के अनुसार अलग compiler बनाना पड़ता हैA compiler has to be built for each machine and processor type to generate output files that can run
Dउपरोक्त सभीAll the above
सही उत्तर / Answer: (D)
हल / Solution
EXE फ़ाइल में एक ही ऑपरेटिंग सिस्टम और एक ही processor के लिए बनी मशीनी भाषा रहती है। Windows उसे चला लेता है, पर Linux और Unix का रूप अलग होता है, इसलिए वहाँ वह नहीं चलती। हर सिस्टम के लिए अलग compiler और अलग build बनानी पड़ती है। तीनों कथन इसी एक परेशानी के अलग-अलग पहलू हैं, इसलिए चौथा विकल्प सही है। जावा bytecode लाकर यही झंझट मिटाती है।
An EXE file holds machine code made for one operating system and one processor family. Windows can run it, but Linux and Unix use a different executable format and cannot read it. To serve every system a separate compiler and a separate build are needed. All three statements describe the same trouble, so option four is correct. Java avoids this problem by using bytecode.
प्रश्न 10उत्तर + हल
जावा की आरंभिक अपार सफलता का कारण क्या था?
What was the reason for the huge initial success of Java?
AWWW (वर्ल्ड वाइड वेब)WWW (World Wide Web)
Bस्मार्ट टीवी का विकासSmart TV evolution
Cस्मार्ट होम ऑटोमेशनSmart home automation
Dउपरोक्त में से कोई नहींNone of the above
सही उत्तर / Answer: (A)
हल / Solution
जावा सन् 1995 में ठीक उसी समय आई जब वर्ल्ड वाइड वेब तेज़ी से फैल रहा था। वेब पेज को ऐसे छोटे प्रोग्राम चाहिए थे जो किसी भी कंप्यूटर पर सुरक्षित ढंग से चल जाएँ, और जावा के applet ने यही काम कर दिखाया। वेब और एक पोर्टेबल भाषा के इसी मेल ने जावा को साल भर में लोकप्रिय बना दिया। स्मार्ट टीवी और होम ऑटोमेशन तो बहुत बाद की बातें हैं।
Java arrived in 1995, just when the World Wide Web was spreading fast. Web pages needed small programs that could run safely on any computer, and Java applets did exactly that. This match between the growing web and a portable language made Java popular within a year. Smart televisions and home automation came much later, so they cannot be the reason.
आगे के 20 प्रश्नों के उत्तर और हल app मेंFliQi Question Bank — अभ्यास, हल और आपकी प्रगति