General KnowledgeHardSSC CGL · SSC CHSL
Which statement correctly distinguishes a compiler from an interpreter?
- A. A compiler translates a program statement by statement while it runs, and an interpreter translates the whole program first
- B. A compiler translates the whole source program into machine code before execution, while an interpreter translates and runs it statement by statement
- C. A compiler runs only assembly programs, and an interpreter runs only high-level programs
- D. A compiler produces output only when the program has no errors, and an interpreter never reports errors
Correct answer: B. A compiler translates the whole source program into machine code before execution, while an interpreter translates and runs it statement by statement
A compiler converts the entire source program to machine code ahead of execution and reports errors for the whole program, whereas an interpreter reads, translates and executes one statement at a time.
हिंदी में
कंपाइलर और इंटरप्रेटर में सही अंतर कौन-सा कथन बताता है?
- A. कंपाइलर प्रोग्राम को चलते समय एक-एक कथन करके अनुवाद करता है, और इंटरप्रेटर पहले पूरे प्रोग्राम का अनुवाद करता है
- B. कंपाइलर पूरे स्रोत प्रोग्राम को निष्पादन से पहले मशीन कोड में बदल देता है, जबकि इंटरप्रेटर एक-एक कथन का अनुवाद करके उसे चलाता है
- C. कंपाइलर केवल असेंबली प्रोग्राम चलाता है, और इंटरप्रेटर केवल उच्च-स्तरीय प्रोग्राम चलाता है
- D. कंपाइलर तभी आउटपुट देता है जब प्रोग्राम में कोई त्रुटि न हो, और इंटरप्रेटर कभी त्रुटि नहीं बताता
उत्तर: B. कंपाइलर पूरे स्रोत प्रोग्राम को निष्पादन से पहले मशीन कोड में बदलता है और पूरे प्रोग्राम की त्रुटियाँ बताता है, जबकि इंटरप्रेटर एक बार में एक कथन पढ़ता, अनुवाद करता और चलाता है।
Practise more Science and Technology (Space, Defence, IT) questionsScience and Technology (Space, Defence, IT): notes and key points
More Science and Technology (Space, Defence, IT) questions
- In web browsing, 'cookies' are:
- The Hubble Space Telescope was placed in orbit in April 1990 by which Space Shuttle?
- The helicopter Ingenuity, which made the first powered, controlled flight on another planet in April 2021, travelled to Mars with which…
- Graphene, isolated in 2004 and honoured with the 2010 Nobel Prize in Physics, consists of carbon atoms arranged in:
- Kavach, deployed on the Indian Railways to prevent train collisions, is an indigenous:
- The first Vande Bharat Express, unveiled in 2018 as 'Train 18', was manufactured at the: