SV
StudyVirus
Get our free app!Download Free

Programming Languages — Set 1

Computers · प्रोग्रामिंग भाषाएं · Questions 110 of 60

00
0/10
1

Which programming language is commonly referred to as the 'Mother of all languages' due to its influence on modern syntax?

💡

Correct Answer: A. C

• **C language** = Developed by Dennis Ritchie at Bell Labs in 1972, C became the syntactic blueprint for nearly every major language that followed, including C++, Java, Python, and JavaScript — making it the single most influential language in computing history. • **Low-level power with high-level syntax** — C allows direct memory manipulation through pointers while still using human-readable code, a rare combination that made it ideal for writing operating systems and compilers. • C was used to rewrite the Unix OS in 1973, which is why it spread to every hardware platform Unix ran on. • 💡 Option B (Fortran) is wrong because Fortran shaped numerical computing but not modern syntax broadly; Option C (COBOL) is wrong because it influenced business data language, not general programming syntax; Option D (Pascal) is wrong because it was a teaching tool with limited adoption beyond academia.

2

Which language was specifically designed for business data processing and is known for its English-like syntax?

💡

Correct Answer: A. COBOL

• **COBOL (Common Business-Oriented Language)** = Developed in 1959 under Grace Hopper's guidance, COBOL was the first language designed so that business managers — not just engineers — could read and understand the code written to process their data. • **English-like syntax by design** — COBOL sentences read like natural English (e.g., MULTIPLY SALARY BY 12 GIVING ANNUAL-INCOME), which was revolutionary for non-technical stakeholders in the 1960s. • Over 95% of ATM transactions and most core banking systems still run on COBOL programs written decades ago, making it one of the most economically critical languages alive. • 💡 Option B (PROLOG) is wrong because it is a logic-programming language used in AI, not business data; Option C (LISP) is wrong because it is a functional language built for symbolic AI research; Option D (BASIC) is wrong because it was built for beginners on microcomputers, not business data processing.

3

What is the primary characteristic of an interpreted language compared to a compiled one?

💡

Correct Answer: D. Direct execution by a translator

• **Direct execution by a translator** = In an interpreted language, a special program called an interpreter reads each line of source code and executes it immediately, without first converting the whole program into a separate binary file — this is the defining difference from compilation. • **No separate compilation step** — Because translation and execution happen together at runtime, interpreted languages allow faster edit-test cycles, which is why Python and JavaScript are popular for rapid development. • The trade-off is speed: interpreted code typically runs 10–100x slower than equivalent compiled code because each line is re-translated every time the program runs. • 💡 Option A (Faster execution) is wrong because interpreted languages are actually slower than compiled ones at runtime; Option B (Requirement for a linker) is wrong because linkers are used in compiled workflows, not interpretation; Option C (Hardware dependency) is wrong because interpreted languages are typically more portable across hardware, not dependent on it.

4

Which programming language is widely considered the first high-level language, designed for mathematical and scientific calculations?

💡

Correct Answer: A. FORTRAN

• **FORTRAN (Formula Translation)** = Released by IBM in 1957 under John Backus, FORTRAN was the world's first commercially successful high-level language, replacing assembly code for scientific calculations and proving that programs could be written in human-readable notation. • **Born for mathematics** — FORTRAN introduced the concept that a programmer could write A = B + C*D and the computer would figure out the machine instructions, a concept so radical it was initially met with skepticism by engineers. • FORTRAN is still actively used today in weather modeling, computational physics, and financial risk analysis because decades of optimized numerical libraries exist in it. • 💡 Option B (C) is wrong because C was created in 1972, fifteen years after FORTRAN; Option C (Algol) is wrong because Algol came slightly later and influenced language theory more than practical computation; Option D (BASIC) is wrong because BASIC appeared in 1964 as a simplified teaching language, not the first high-level language.

5

In computer science, what does 'LISP' stand for, especially in the context of Artificial Intelligence?

💡

Correct Answer: D. List Processing

• **LISP = List Processing** = Created by John McCarthy at MIT in 1958, LISP represents all data and code as linked lists, making it uniquely suited for symbolic manipulation — the core requirement of artificial intelligence research. • **Second oldest high-level language still in use** — Only FORTRAN predates LISP; its longevity (through dialects like Clojure and Common Lisp) reflects how well its core design maps to AI problem-solving. • McCarthy invented LISP while working on AI and needed a language that could treat programs as data and modify itself — a property called homoiconicity that most languages still lack. • 💡 Option A (Logic Integration System) is wrong because that phrase was never the name of any real language or system; Option B (Language for Intelligence) is wrong because it is a made-up expansion not associated with LISP's origin; Option C (Linear Information Search) is wrong because it has no connection to LISP's list-processing design.

6

Which type of language uses 'mnemonics' like ADD, SUB, or MOV to represent machine instructions?

💡

Correct Answer: A. Assembly Language

• **Assembly Language** = Assembly uses short human-readable codes called mnemonics — such as MOV, ADD, and SUB — to represent individual CPU instructions, making machine-level programming far more manageable than writing raw binary numbers. • **Requires an Assembler** — An assembler is a program that converts these mnemonic codes into the binary machine language the processor actually executes, acting as the bridge between human and machine. • Assembly language is processor-specific: x86 assembly written for an Intel chip cannot run on an ARM chip without rewriting, which is its major limitation compared to high-level languages. • 💡 Option B (Machine Language) is wrong because machine language consists entirely of binary digits (0s and 1s) with no mnemonics at all; Option C (High-level Language) is wrong because high-level languages like C or Java are far more abstract and human-readable than assembly; Option D (Object-oriented Language) is wrong because OOP is a programming paradigm, not a category defined by mnemonic instructions.

7

Which language was developed by James Gosling at Sun Microsystems with the slogan 'Write Once, Run Anywhere'?

💡

Correct Answer: D. Java

• **Java** = Developed by James Gosling at Sun Microsystems and released in 1995, Java compiles source code into an intermediate format called bytecode that runs on the Java Virtual Machine (JVM), making the same program work on Windows, Linux, or macOS without rewriting. • **Write Once, Run Anywhere via the JVM** — The JVM acts as a software layer that translates bytecode into native machine instructions for whatever hardware it runs on, which was a breakthrough in an era when different systems needed separate codebases. • Java remains the dominant language for Android app development and large-scale enterprise backend systems like those used in banking and e-commerce. • 💡 Option A (C++) is wrong because C++ compiles to native machine code specific to one platform and has no virtual machine; Option B (Swift) is wrong because Swift is Apple's language locked to its own ecosystem; Option C (Python) is wrong because Python is interpreted and was never marketed with the Write Once Run Anywhere slogan.

8

The concept of 'Object-Oriented Programming' (OOP) was first fully implemented in which language?

💡

Correct Answer: A. Smalltalk

• **Smalltalk** = Created at Xerox PARC by Alan Kay's team in the early 1970s, Smalltalk was the first language to fully implement Object-Oriented Programming — everything in Smalltalk is an object, including numbers, classes, and even methods themselves. • **Messages instead of function calls** — In Smalltalk, objects communicate exclusively by sending messages to each other, which became the conceptual foundation of OOP in all successor languages like Objective-C, Ruby, and Java. • The graphical user interface (GUI) concept was also born at Xerox PARC alongside Smalltalk, and the two innovations were deeply intertwined. • 💡 Option B (Fortran) is wrong because Fortran is a procedural language designed for scientific formulas with no OOP concepts; Option C (Ada) is wrong because Ada came after Smalltalk and supports OOP as an addition, not as its founding design; Option D (BASIC) is wrong because BASIC was designed for simple sequential programs and has no object-oriented architecture.

9

Which language is primarily used for client-side web development to provide interactivity to web pages?

💡

Correct Answer: A. JavaScript

• **JavaScript** = Created by Brendan Eich at Netscape in 1995 in just 10 days, JavaScript runs inside the user's web browser (client-side) and allows web pages to respond to clicks, validate forms, animate elements, and update content without reloading — making web pages interactive rather than static. • **Unrelated to Java despite the name** — The name 'JavaScript' was a marketing decision to ride Java's popularity in 1995; the two languages share no code, runtime, or design philosophy. • JavaScript is now also used on servers (via Node.js), in mobile apps, and in machine learning, making it the most versatile language by deployment breadth. • 💡 Option B (PHP) is wrong because PHP runs on the server side, not in the browser, and generates HTML before it reaches the user; Option C (HTML) is wrong because HTML is a markup language that defines structure but has no programming logic or interactivity; Option D (CSS) is wrong because CSS controls visual styling only and cannot respond to user actions.

10

Which language is known for its use of indentation rather than curly braces to define blocks of code?

💡

Correct Answer: D. Python

• **Python** = Created by Guido van Rossum and first released in 1991, Python enforces indentation as a syntactic rule — code blocks are defined by consistent spacing rather than curly braces, which forces every programmer to write visually clean, readable code by default. • **Indentation is mandatory, not stylistic** — If indentation is inconsistent in Python, the program throws a syntax error and refuses to run, unlike C or Java where formatting is optional. • Python is currently the world's most popular language for data science, machine learning, and AI research, with libraries like NumPy, pandas, TensorFlow, and scikit-learn forming its ecosystem. • 💡 Option A (Perl) is wrong because Perl uses curly braces for blocks and is famous for dense, hard-to-read syntax; Option B (C#) is wrong because C# uses curly braces inherited from C and indentation is only a style convention; Option C (Ruby) is wrong because Ruby uses 'end' keywords to close blocks, not indentation.