Programming Languages — Set 5
Computers · प्रोग्रामिंग भाषाएं · Questions 41–50 of 60
Which language is universally used for managing and querying data in Relational Database Management Systems (RDBMS)?
Correct Answer: C. SQL
• **SQL (Structured Query Language)** = the universal standard language for creating, reading, updating, and deleting data in relational databases — it is used with every major RDBMS including MySQL, Oracle, PostgreSQL, SQL Server, and SQLite. • **Declarative nature** — SQL is not procedural; you simply write *what* data you want (SELECT name FROM students WHERE marks > 90) and the database engine figures out *how* to retrieve it efficiently. • SQL was originally developed by IBM in the 1970s and became an ANSI/ISO standard in 1987, making knowledge of it transferable across database platforms. • 💡 Option A (C++) is wrong because C++ is a general-purpose programming language for applications and systems software, not for querying databases; Option B (Java) is wrong because Java is an OOP language used to build applications — it can *connect* to databases using JDBC but cannot query them natively without SQL; Option D (Python) is wrong because Python is a general-purpose scripting language that also uses SQL (via libraries like SQLAlchemy) to interact with databases — it does not replace SQL.
Which of the following is the only language that a computer can understand directly without translation?
Correct Answer: B. Machine Language
• **Machine Language** = the only language the CPU understands natively without any translation — it consists entirely of binary digits (0s and 1s) that directly control the processor's electronic circuits and registers. • **All roads lead to machine code** — every other language, whether Assembly, C, Java, or Python, must ultimately be converted into machine language through an assembler, compiler, or interpreter before the hardware can execute it. • Machine language is specific to each processor architecture; code written for an Intel x86 chip cannot run on an ARM chip without re-compilation. • 💡 Option A (Assembly Language) is wrong because Assembly uses human-readable mnemonics and still requires an assembler to translate it into binary before the CPU can run it; Option C (C Language) is wrong because C is a high-level language that must be compiled into machine code first; Option D (BASIC) is wrong because BASIC is also a high-level language that requires an interpreter or compiler to run.
FORTRAN, the first high-level language, is primarily used for which of the following?
Correct Answer: B. Scientific and engineering calculations
• **FORTRAN (FORmula TRANslation)** = the world's first high-level programming language, developed by IBM in 1957 specifically to translate complex mathematical formulas into computer code, making scientific programming dramatically faster than writing in Assembly. • **Still relevant today** — FORTRAN's highly optimised compilers for numerical computation make it so fast that it is still used in weather forecasting, computational fluid dynamics, astrophysics simulations, and high-performance computing benchmarks (like LINPACK). • FORTRAN introduced the concept of loops and if-statements that influenced virtually every programming language that followed it. • 💡 Option A (Business applications) is wrong because COBOL, not FORTRAN, was designed for business and administrative data processing; Option C (Web designing) is wrong because web design uses HTML, CSS, and JavaScript — FORTRAN has no role in web development; Option D (Mobile app development) is wrong because mobile development uses Swift, Kotlin, and Java — FORTRAN is not used for modern app development.
What is the primary role of an 'Interpreter' in programming?
Correct Answer: A. To translate and execute code line by line
• **Interpreter** = a program that reads source code one line (or statement) at a time, translates it to machine code, and executes it immediately — there is no separate compilation step, so the programmer can see results instantly. • **Trade-off vs. compiler** — because each line is translated at runtime, interpreters are slower at execution than compiled programs, but they make debugging much easier since errors are reported at the exact line being executed when the fault occurs. • Python, JavaScript, Ruby, and PHP use interpreters (or just-in-time compilation hybrids); interpreted code is not stored as a standalone executable file. • 💡 Option B (To translate the whole program at once) is wrong because that is the job of a *compiler*, which converts the entire source code into a machine-code executable before any execution begins; Option C (To link files together) is wrong because linking is done by a *linker* that combines separately compiled object files into a single program; Option D (To check the hardware) is wrong because hardware diagnostics are done by firmware or OS utilities, not language interpreters.
Which programming language was developed by Dennis Ritchie at AT&T Bell Labs in the early 1970s?
Correct Answer: A. C
• **C language** = developed by Dennis Ritchie at AT&T Bell Labs between 1969 and 1973, primarily to rewrite the Unix operating system in a portable, efficient language — before C, operating systems were written in Assembly, which was hardware-specific and extremely tedious. • **Mother of modern languages** — C's syntax (curly braces, semicolons, data types, pointers) directly influenced C++, Java, C#, JavaScript, Python, and virtually every mainstream language used today. • C gives programmers direct control over memory through pointers, which makes it fast enough for operating systems, embedded systems, and device drivers. • 💡 Option B (C++) is wrong because C++ was created by Bjarne Stroustrup later (1983) as an extension of C with object-oriented features — Dennis Ritchie created C, not C++; Option C (Java) is wrong because Java was developed by James Gosling at Sun Microsystems in the early 1990s, two decades after C; Option D (Ada) is wrong because Ada was developed by the US Department of Defense in the late 1970s for safety-critical systems — not by Dennis Ritchie at Bell Labs.
Which language is considered a 'Second Generation' computer language?
Correct Answer: B. Assembly Language
• **Assembly Language = 2nd Generation Language (2GL)** — it replaced raw binary with short, human-readable mnemonics like ADD, MOV, and JMP, making low-level programming far less error-prone than typing 0s and 1s directly. • **Generation ladder** — 1GL is machine code (pure binary); 2GL is Assembly (mnemonics); 3GL includes FORTRAN, COBOL, C (English-like, portable); 4GL includes SQL and report generators (even higher abstraction). • Assembly is still used today for writing device drivers, boot loaders, and performance-critical routines where direct hardware control is needed. • 💡 Option A (Machine Language) is wrong because machine language is the 1st generation — the most primitive level consisting only of binary; Option C (FORTRAN) is wrong because FORTRAN belongs to the 3rd generation of languages as it introduced high-level constructs that needed a compiler; Option D (LISP) is wrong because LISP, developed in 1958 for artificial intelligence, is also a 3rd generation language and not related to Assembly.
In the context of computer programming, what does 'COBOL' stand for?
Correct Answer: A. Common Business Oriented Language
• **COBOL = Common Business-Oriented Language** — developed in 1959 under the leadership of Grace Hopper and the US Department of Defense to create a standard, readable language for business data processing tasks like payroll, inventory, and financial reporting. • **Longevity in banking** — despite being over 60 years old, an estimated 95 billion lines of COBOL code are still actively running the core systems of major banks, insurance companies, and government agencies worldwide. • COBOL's syntax reads almost like plain English (e.g., MOVE SALARY TO GROSS-PAY), which was a revolutionary design choice in 1959. • 💡 Option B (Computer Business Oriented Language) is wrong because the first word is 'Common', not 'Computer' — COBOL was intentionally named 'Common' to emphasise cross-platform compatibility; Option C (Code Based Operating Language) is a fabricated expansion with no historical basis; Option D (Central Business Operation Logic) is also a made-up phrase — the correct full form is Common Business Oriented Language.
Which language is most frequently used for creating Artificial Intelligence applications due to its extensive libraries?
Correct Answer: B. Python
• **Python** = the dominant language for AI and machine learning because its ecosystem includes powerful libraries like TensorFlow (deep learning), PyTorch (neural networks), Scikit-learn (classical ML), Pandas (data manipulation), and NumPy (numerical computing) — all freely available and beginner-friendly. • **Readable syntax advantage** — Python's clean, minimal syntax means a researcher can prototype a machine learning model in a few dozen lines, allowing rapid experimentation that would take hundreds of lines in Java or C++. • Python was created by Guido van Rossum in 1991 and consistently ranks as the #1 language in AI/ML surveys and programming indices like TIOBE. • 💡 Option A (COBOL) is wrong because COBOL is a legacy business language with no AI libraries or machine learning ecosystem; Option C (Pascal) is wrong because Pascal was designed as a teaching language in the 1970s and has been largely obsolete in professional AI development for decades; Option D (BASIC) is wrong because BASIC was designed for beginners on early home computers and lacks the libraries and computational capabilities needed for modern AI.
Which language was developed by Bjarne Stroustrup as an extension of the C language?
Correct Answer: B. C++
• **C++** = created by Bjarne Stroustrup at Bell Labs starting in 1979 as 'C with Classes' — an extension of C that added object-oriented features (classes, inheritance, polymorphism) while retaining C's low-level performance and direct hardware access. • **Why it matters** — C++ powers performance-critical software that cannot afford slowdowns: game engines (Unreal Engine), operating system kernels, browsers (Chrome's V8 engine), and real-time trading systems all use C++. • C++ introduced the concept of templates (generic programming), which later influenced Java's generics and C#'s LINQ. • 💡 Option A (C#) is wrong because C# was developed by Microsoft in 2000 as part of the .NET framework — it was created by Anders Hejlsberg, not Bjarne Stroustrup, and is not an extension of C; Option C (Objective-C) is wrong because Objective-C was developed by Brad Cox in the early 1980s at Stepstone Corporation, independently of Stroustrup's work; Option D (Java) is wrong because Java was created by James Gosling at Sun Microsystems and was designed as a completely new language, not an extension of C.
What is the name of the software that translates high-level code into machine code all at once before execution?
Correct Answer: C. Compiler
• **Compiler** = a software tool that reads the complete source code of a program, analyses it entirely, and translates it all at once into an executable machine-code file — once compiled, the program runs directly on the CPU without needing the compiler again. • **Speed advantage** — because the translation happens only once before execution, compiled programs run significantly faster at runtime than interpreted ones; this is why performance-critical software in C or C++ is always compiled. • Languages like C, C++, and Go use compilers; Java compiles to bytecode which then runs on the JVM (a hybrid approach). • 💡 Option A (Assembler) is wrong because an assembler specifically converts Assembly language (not high-level code) into machine code — it works at a much lower level than a compiler; Option B (Interpreter) is wrong because an interpreter translates and executes code line by line at runtime rather than converting the whole program at once before execution; Option D (Debugger) is wrong because a debugger is a tool for finding and fixing errors in code — it does not perform any translation.