Solved MCQs - CS508 Modern Programming
83 Questions
10 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Ada discriminate types is similar to ______.

  • C/C++ reference
  • C/C++ union
  • all of the given
  • C/C++ pointer (correct)
  • The block structure feature of ALGOL60 has ______ scope.

  • Local (correct)
  • No
  • Global
  • Universal
  • In the Decimal fixed point type, the distance between values is implemented as a power of ______.

  • 16
  • 10 (correct)
  • 2
  • 8
  • Function must have at least ______ return statement.

    <p>One</p> Signup and view all the answers

    ______ operations must have one of its parameters of the tagged type.

    <p>Primitive</p> Signup and view all the answers

    An understanding of implementation issues leads to a/an ______ of why languages are designed the way they are.

    <p>Understanding</p> Signup and view all the answers

    ______ has an efficient use of processor and memory.

    <p>LISP</p> Signup and view all the answers

    ______ is/are harmful as far as readability is concerned.

    <p>Overloading</p> Signup and view all the answers

    A language that can be used for a wide domain of applications has higher ______.

    <p>Generality</p> Signup and view all the answers

    Which statement is true from programming language evolution perspective about 1970's era?

    <p>Era of effective software technology</p> Signup and view all the answers

    Variable name in SNOBOL may not be longer than ______.

    <p>120 characters</p> Signup and view all the answers

    If we have two spaces in SNOBOL the first is used for ______ and the second one for ______.

    <p>pattern matching, concatenation</p> Signup and view all the answers

    Today about 50% coding is done in ______.

    <p>C</p> Signup and view all the answers

    Which statement is correct about Table in SNOBOL?

    <p>Table can be indexed by both keys and numbers</p> Signup and view all the answers

    Which of the following statement is Correct about SNOBOL?

    <p>Poor readability and writability</p> Signup and view all the answers

    The first-level elements in LISP are called ______ level elements.

    <p>Top</p> Signup and view all the answers

    To write a user defined function in LISP we use ______.

    <p>Defun</p> Signup and view all the answers

    Dotime loop of LISP is similar in working to ______ of Ada.

    <p>for loop</p> Signup and view all the answers

    (.)Dot operator is a ______ in SNOBOL.

    <p>Binary operator</p> Signup and view all the answers

    The GOTO statement in SNOBOL is ______.

    <p>explicit</p> Signup and view all the answers

    The first argument in LISP list is the ______.

    <p>atom</p> Signup and view all the answers

    Function in LISP is in ______ notation.

    <p>prefix</p> Signup and view all the answers

    ______ may also change global variable as a side effect.

    <p>dolist LISP iteration</p> Signup and view all the answers

    We have extensive use of ______ in LISP.

    <p>recursion</p> Signup and view all the answers

    Java has no ______.

    <p>multiple inheritance</p> Signup and view all the answers

    Which of the following is a language designed for distributed computing architecture?

    <p>CORBA</p> Signup and view all the answers

    ______ does not have a predefined inheritance hierarchy.

    <p>Ada</p> Signup and view all the answers

    Record in Ada is similar to structure in C/C++. Record members in Ada is accessed through a/an ______.

    <p>(.)Dot operator</p> Signup and view all the answers

    We may create our own exceptions in ______.

    <p>Ada</p> Signup and view all the answers

    A language is reliable if during execution it does not create ______.

    <p>Error</p> Signup and view all the answers

    If the program written in a particular language is less ______ than the cost of failure of the system may be significant.

    <p>Reliable</p> Signup and view all the answers

    The portability has direct relation with ______.

    <p>Standardization</p> Signup and view all the answers

    Conditional control transfer" gave rise to the idea of ______, which are blocks of code that can be reused over and over.

    <p>Libraries</p> Signup and view all the answers

    Identify the feature which was not available in FORTRAN-IV.

    <p>support for structured programming</p> Signup and view all the answers

    ______ programming language is known as “Write-Only” language.

    <p>APL</p> Signup and view all the answers

    Which statement is true about SNOBOL?

    <p>Its developers have limited introduction with computer science</p> Signup and view all the answers

    SONOBOL is case ______.

    <p>In-Sensitive</p> Signup and view all the answers

    The earliest form of a computer language was ______ motion.

    <p>Physical</p> Signup and view all the answers

    ______ is The First High Level Language.

    <p>FORTAN</p> Signup and view all the answers

    Following factors influences a portable language design EXCEPT ______.

    <p>Windows XP</p> Signup and view all the answers

    ______ is concerned with maintenance and debugging this is a very important concern because if maintenance cost is reduced, the overall cost on the software will also be reduced.

    <p>Readability</p> Signup and view all the answers

    A language that is more orthogonal is usually more ______.

    <p>Readable</p> Signup and view all the answers

    Which of the given resulted in more complex software requiring support for software engineering in the programming languages.

    <p>Decreasing Hardware Cost and increasing Software Cost</p> Signup and view all the answers

    COBOL is mainly designed for ______.

    <p>Business application</p> Signup and view all the answers

    First language that provided the concept of Pointer data type was ______.

    <p>PL/1</p> Signup and view all the answers

    • Sign is used for ______ in SONOBOL.

    <p>Line Continuation</p> Signup and view all the answers

    First electronic computer was ______.

    <p>ENIAC</p> Signup and view all the answers

    : Sign in program written in SONOBOL is used to show the ______.

    <p>Line breaking</p> Signup and view all the answers

    Following are some of the reasons for studying concepts related to different programming languages EXCEPT ______.

    <p>Increased capability to design communication links</p> Signup and view all the answers

    Following are object oriented programming languages EXCEPT ______.

    <p>LISP</p> Signup and view all the answers

    Following are imperative languages EXCEPT ______.

    <p>LISP</p> Signup and view all the answers

    Learning the implementation details of a language helps the programmer in...

    <p>Both finding and fixing bugs</p> Signup and view all the answers

    Learning curve is ______ proportional to the number of basic components.

    <p>Directly</p> Signup and view all the answers

    Binary operator in SONOBOL must has at least ______ spaces on both sides.

    <p>1</p> Signup and view all the answers

    PROLOG represent ______ paradigm.

    <p>Declarative</p> Signup and view all the answers

    ______ was the first object oriented language.

    <p>SIMULA</p> Signup and view all the answers

    “Everything for everybody” was the motive of the language ______.

    <p>PL/1</p> Signup and view all the answers

    COBOL was the first language that brings the concept of ______.

    <p>Records</p> Signup and view all the answers

    ______ are a type of Aliasing.

    <p>Arrays</p> Signup and view all the answers

    SNOBOL was designed for ______ purpose.

    <p>String manipulation</p> Signup and view all the answers

    A space is used as for ______ concatenation.

    <p>Operator</p> Signup and view all the answers

    A language evaluation criteria includes following factors EXCEPT ______.

    <p>Modularity</p> Signup and view all the answers

    Learning different programming languages helps in increasing the ______ to express programming concepts.

    <p>Capacity</p> Signup and view all the answers

    If a language provides a feature of referencing a variable in more than one way then we say that the language provides ______.

    <p>Aliasing</p> Signup and view all the answers

    For immediate value assignment ______ sign is used.

    <p>$</p> Signup and view all the answers

    ______ was considered good for describing algorithms.

    <p>ALGOL</p> Signup and view all the answers

    Which of the following is an incorrect option from the following statements regarding ‘objectives of learning new languages’?

    <p>Help in understanding the language piracy policy.</p> Signup and view all the answers

    If a language become very simple then it will ______.

    <p>increase readability</p> Signup and view all the answers

    LISP was basically developed to solve ______ problems.

    <p>Artificial intelligence</p> Signup and view all the answers

    Smalltalk was the first purest ______ language and pioneered graphical user interface.

    <p>object oriented</p> Signup and view all the answers

    Which of the following is used for indirect referencing in SNOBOL?

    <p>Unary $</p> Signup and view all the answers

    SIZE () arid REPLACE () in SNOBOL4 are ______ functions.

    <p>Primitive</p> Signup and view all the answers

    Which concept does NOT contribute to the reliability of a programming language?

    <p>Language development environment</p> Signup and view all the answers

    Which language serves as a middle layer between a web browser and a database?

    <p>JavaScript</p> Signup and view all the answers

    What is the only control structure available in SNOBOL?

    <p>Go to Statement</p> Signup and view all the answers

    Which language stores two-dimensional arrays in a column-major order?

    <p>FORTRAN</p> Signup and view all the answers

    Which of the following was the first high-level programming language?

    <p>FORTRAN</p> Signup and view all the answers

    In the Ordinary fixed-point type, what is the power base used for the distance between values?

    <p>2</p> Signup and view all the answers

    How does operator overloading generally affect the writability and readability of code?

    <p>It increases writability, decreases readability</p> Signup and view all the answers

    Which symbol is used in LISP to prevent the evaluation of a symbol?

    <p>Quote</p> Signup and view all the answers

    Unlike C/C++, Ada can have ______ within functions/procedures.

    <p>Objects</p> Signup and view all the answers

    Imperative programming languages are the direct result of ______.

    <p>Von Neumann architecture</p> Signup and view all the answers

    "Everything for everybody" was the motive of the language ______.

    <p>PL/1</p> Signup and view all the answers

    Study Notes

    Solved MCQs - CS508 Modern Programming

    • Discriminate Types (Question 1): Ada discriminate types are similar to C/C++ pointers.

    • ALGOL60 Block Structure (Question 2): The block structure feature of ALGOL60 has local scope.

    • Ada Features (Question 3): Unlike C/C++, Ada can have functions/procedures, objects, and events within functions/procedures, along with parameters.

    • Decimal Fixed Point (Question 4): In Decimal fixed point type, distance between values is implemented as a power of 2.

    • Function Return Statement (Question 5): Functions must have at least one return statement; procedures do not require return statements. The return statement's expression must match the function's declared return type.

    • Tagged Type Parameters (Question 6): Operations must have one of their parameters as the tagged type.

    • Understanding Implementation Issues (Question 7): Understanding implementation issues leads to a better understanding of why languages are designed the way they are.

    Additional MCQs

    • Efficient Processor/Memory Use (Question 8): LISP has efficient use of processor and memory.

    • Readability Concerns (Question 9): Overloading, statements like break/continue, and case statements are harmful when readability is a concern.

    • High Generality (Question 10): A language used for a wide domain of applications has higher generality.

    • Imperative Language Origin (Question 11): Imperative programming languages are a direct result of Charles Babbage's engine (and subsequent architectures), logic and list program languages, and Von Neumann architecture.

    • SNOBOL Variable Length (Question 13): Variable names in SNOBOL may not exceed 120 characters.

    • SNOBOL Space Usage (Question 14): In SNOBOL, the first space is for concatenation and the second is for pattern matching operations.

    • Common Programming Language (Question 15): Today, about 50% of coding is in C.

    • Table Indexing (Question 16): Tables in SNOBOL can be indexed by number and/or key, or both.

    • SNOBOL Readability and Writability (Question 17): SNOBOL has poor readability but good writability.

    • LISP Top Level Elements (Question 18): The first-level elements in LISP are called top-level elements.

    • LISP User Defined Functions (Question 19): Use the defun keyword in LISP to write user-defined functions.

    • LISP Loop Similarity (Question 20): LISP's do-time loop functions similarly to Ada's while loop statements.

    • SNOBOL Dot Operator (Question 21): The dot operator (.) is a unary operator in SNOBOL.

    • SNOBOL GOTO (Question 22): The GOTO statement in SNOBOL is implicit.

    • LISP List Element (Question 23): The first argument is the first element of a LISP list. A LISP list's first argument can be an atom or another LISP list.

    • LISP Function Notation (Question 24): Functions in LISP are in prefix notation.

    • Global Variable Side Effects (Question 25): LISP may change global variables as a side effect.

    • LISP Extensive Use (Question 26): In LISP, we extensively use recursion.

    • Distributed Computing Language (Question 28): CORBA is designed for distributed computing architecture.

    • Ada Records (Question 30): Ada records are similar to C/C++ structures, accessed using the (.) dot operator.

    • Exception Handling (Question 31): Ada supports creating your own exceptions.

    • Language Reliability (Question 32): A reliable language does not create errors during execution.

    • Portability Relation (Question 34): Portability is directly related to Readability & Simplicity

    • Conditional Control Transfer (Question 35): Conditional control transfer led to the concept of reusable code blocks.

    • FORTRAN-IV Features (Question 36): Procedural programming languages like FORTRAN-IV did not support features for structured programming, explicit data types or passing subprograms as parameters.

    • Language Character Limit (Question 37): The maximum length of a variable name in SNOBOL is 120 characters.

    • SNOBOL Character Recognition (Question 38): SNoBOL developers are computer scientists by specialization/training.

    • SNOBOL Sensitivity (Question 39): SNOBOL is sensitive to the case of variable names (e.g., myVariable is different from myvariable).

    • Early Computer Language (Question 40): The earliest electronic computer language was physical.

    • First High-Level Language (Question 41): FORTRAN is the first High Level Language.

    • Portable Language Design Factors (Question 42): Factors influencing portablility are Computer Architecture, Readability, and required Programmer time.

    • Software Maintenance (Question 43): Windows XP is concerned with software maintenance concerns because reduced maintenance costs will reduce the overall software costs.

    • Orthogonal Language (Question 44): More orthogonal languages are usually more readable, writtable, and portable in usage.

    • Complex Software Requirements (Question 45): Increasing hardware cost and decreasing software costs led to more complex software requiring support for software engineering in programming languages.

    • Design Purpose of COBOL (Question 46): COBOL is typically designed for business applications.

    • Pointer Data Type Language (Question 47): PL/I was the first language that provided pointer data types.

    • SNOBOL Line Continuation (Question 48): A plus (+) sign is used for line continuation in SNOBOL.

    • Earliest Computer (Question 49): ENIAC was the first electronic computer.

    • SNOBOL Colon (Question 50): The colon (:) in SNOBOL is used to indicate line continuation.

    • Programming Language Study Reasoning (Question 51): increased capability to learn new languages was a reason for the study of programming.

    • Programming Languages with Concepts(Question 52): C++, JAVA, and their derivatives are object oriented programming languages.

    • Importance of Implementation Details in Learning (Question 54): Learning implementation details helps a programmer to find and fix bugs.

    • Language Learning Curve (Question 55): The learning curve is directly proportional to the number of basic components of a language.

    • Binary Operator Spaces (Question 56): Binary operators in SNOBOL4 require at least two spaces on either side.

    • Programming Language Paradigm (Question 57): PROLOG uses a declarative approach as a programming paradigm.

    • First Object-Oriented Language (Question 58): Simula 67 was the first object oriented programming language.

    • Programming Language Motivation (Question 59): everything for everybody was the motive behind one language or programming philosophy's creation.

    • COBOL Data Structures (Question 60): COBOL introduced hierarchical data structures like records and nested selection statements.

    • Aliasing Mechanisms (Question 61): Pointers, arrays, and linked lists are associated with aliasing.

    • SNOBOL Purpose (Question 62): SNOBOL was designed for string manipulation.

    • SNOBOL Space Character use (Question 63): A space in SNOBOL was used for concatenation.

    • Software Evaluation Factors (Question 64): Portability, Writability, Readability, and Modularity (or a combination of multiple factors) affect evaluating programming language effectiveness.

    • Learning Multiple Languages (Question 65): Learning multiple programming languages improves capacity to express a programming concept.

    • Programming Language Multiple Referencing Variables (Question 66): A language that allows multiple ways to reference a variable is implementing an aliasing capability.

    • Immediate Assignment Sign (Question 67): * sign is typically used for immediate assignment operations.

    • Algorithm Descriptive Language (Question 68): FORTRAN was good describing algorithms.

    • New Language Learning (Question 69): Helping to choose a language for a specific development application is a valid goal for understanding languages.

    • Simpler Language Qualities (Question 70): If a language is complex but simple to use, it is likely the readability will increase; if the language is too simple, the opposite may be true.

    • LISP Purpose (Question 71): LISP was primarily developed for Artificial Intelligence and related areas of study.

    • Smalltalk Language Focus (Question 72): Smalltalk was one of the first pure object-oriented programming languages.

    • Indirect Referencing in SNOBOL (Question 73): In SNOBOL, an indirect reference uses the $ operator.

    • SIZE/REPLACE Functions (Question 74): SIZE and REPLACE functions are primitive functions in SNOBOL.

    • Language Reliability Characteristics (Question 75): The concept of a robust language includes type checking, boundary checks, exception handling and a well-documented language development environment.

    • PHP and Other Scripting Languages (Question 76): in JavaScript is used as a middle-layer between a database and client-side applications, often in web browser contexts.

    • 唯一控制结构 (Question 77): The only control structure in SNOBOL is the if-else statement.

    • Array Storage Order (Question 78): Two-dimensional arrays are typically stored column-wise in languages such as FORTRAN

    • First High-Level Language (Question 79): FORTRAN is considered to be the first high-level programming language.

    • **Meaningful Language Development (Question 80):**SNOBOL was important because it was one of the first steps towards the more complex languages we see today.

    • Standardized Language (Question 81): Ada 95 is a standardized programming language, and is an extension of its predecessor Ada 83.

    • Fixed Point Representation (Question 82): In ordinary fixed point types, the distance between values is implemented as a power of two.

    • Operator Overloading Impact (Question 83): Operator overloading can improve writability but decreases readability

    • Language Evaluation Factor (Question 84): Factors not related to language effectiveness that should not be used as evaluation criteria are orthogonal, readability, and writability, and aliasing (these factors are related to effectiveness and suitability).

    • C Programming Language Features (Question 85): C programming is a language related to string manipulation, provides exception handling, includes a comprehensive toolkit of operators, and does not use objects or classes.

    • SNOBOL Operators (Question 86): Unary and binary operations in SNOBOL are both right associative.

    • Arithmetic Language (Question 87): Space, string, character are the different arithmetic expression types (or operators) in SNOBOL.

    • Indirect Reference Operator (Question 88): The . (dot) operator is used for indirect referencing in SNOBOL.

    • Program Function Structure (Question 89): LISP uses a structured approach to functional programming to represent program structure as functions.

    • Dynamic Typing (Question 90): LISP is one of the first programming languages that introduced the concept of dynamic typing, allowing flexible data types for variables.

    • Preventing Symbol Evaluation (Question 91): The quote symbol in LISP prevents a symbol from being evaluated immediately.

    • Ada Composite Type (Question 92): Arrays are a composite data type in Ada.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Description

    Test your knowledge with these solved multiple-choice questions from CS508 Modern Programming. The quiz covers key concepts like Ada discriminate types, ALGOL60 block structure, and function return statements among others. Enhance your understanding of modern programming languages through these challenging questions.

    More Like This

    Ada Lovelace
    10 questions

    Ada Lovelace

    SteadiestCarnelian avatar
    SteadiestCarnelian
    Ada's NeuraOptim Project
    10 questions
    Programming Languages Overview
    253 questions
    Use Quizgecko on...
    Browser
    Browser