C++ Programming Concepts
55 Questions
2 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

In C++ programming, a variable which stores a reference to another variable is called

  • Asterisks
  • Structure
  • Pointer (correct)
  • Constructor
  • A program that translates a high-level language like C++ to a machine language is called a _____

  • Compiler (correct)
  • Disassembler
  • Assembler
  • Coder
  • In C++ programming, assume that the value of the variable A is 0 and the value of the variable B is 10. Which one of the following alternatives is false?

  • (A > 20) || (B > 5)
  • (B == 10) || (x < y)
  • (A > 10) && (x < y) (correct)
  • (A == 0) && (B < 20)
  • Which one of the following formats is correct about functions in structural Programming?

    <p>Type name ( parameter1, parameter2,...) {statement }</p> Signup and view all the answers

    Which of the following is a valid function call (assuming the function add exists & have two parameters)?

    <p>add(a,b);</p> Signup and view all the answers

    A function is said to be a recursive function__________?

    <p>If the function calls itself</p> Signup and view all the answers

    What will be the return type of a function, if the function does not have a return value?

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

    ____ is a header file which permits writing of data to a file.

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

    Which one of the following statements are true?

    <p>All are correct</p> Signup and view all the answers

    _________ a Variable that is available anywhere within your program.

    <p>Global Variable</p> Signup and view all the answers

    If a class is named Student, the class constructor name is__________..

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

    A visibility modifier that makes methods and data fields accessible only from within its own class is

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

    The keyword used to create subclass/derived class in inheritance is

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

    Which of the following is not a valid variable in java?

    <p>A@2$</p> Signup and view all the answers

    A blueprint of an object is called ________.

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

    It defines how and where data are organized in physical data storage

    <p>Internal Schema</p> Signup and view all the answers

    During modeling your data, Entity Relationship is applied at

    <p>Conceptual database</p> Signup and view all the answers

    Criteria that should not be considered when evaluating or assessing requirement analysis?

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

    The SQL command that you use to define the primary key for an existing table called 'Employee' with the primary column as 'empid'?

    <p>ALTER TABLE Employee ADD PRIMARY KEY (empid)</p> Signup and view all the answers

    While checking the normalization process, the problem that doesn’t exist on transitive dependency is

    <p>Revoke Anomaly</p> Signup and view all the answers

    You need to produce a report for mailing labels for customers. The mailing label must have only the customer name and address. The CUSTOMERS table has these columns: ID, NAME, ADDRESS, PHONE. Which SELECT statement accomplishes this task?

    <p>SELECT name, address FROM customers;</p> Signup and view all the answers

    If the maximum cardinality is equal to 1 in both directions of a relationship, then it is classified as:

    <p>One-to-one</p> Signup and view all the answers

    What is the preferred way for adding a background color in HTML?

    Signup and view all the answers

    What is the method used to get the result from the form data sent with both GET and POST?

    <p>A &amp; B</p> Signup and view all the answers

    Which of the following is an optional parameter while using mysqli_connect() method?

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

    From the following list, choose the most appropriate update statement

    <p>UPDATE student SET name='abel' where ID='123';</p> Signup and view all the answers

    When does a page fault occur?

    <p>The page does not present in memory.</p> Signup and view all the answers

    Which of the following is a condition that causes deadlock?

    <p>All of these</p> Signup and view all the answers

    What is an operating system?

    <p>All of the above</p> Signup and view all the answers

    Which CPU scheduling algorithm allocates the CPU first to the process that requests the CPU first?

    <p>First-come, first-served scheduling</p> Signup and view all the answers

    What is the ready state of a process?

    <p>When the process is unable to run until some task has been completed</p> Signup and view all the answers

    A set of processes is in a deadlock if ________?

    <p>Each process is blocked and will remain so forever</p> Signup and view all the answers

    In Operating Systems, which of the following are CPU scheduling algorithms?

    <p>All of the mentioned</p> Signup and view all the answers

    In which of the storage placement strategies, is a program placed in the largest available hole in the main memory?

    <p>Worst fit</p> Signup and view all the answers

    A measurement that defines the level of inter-dependability among modules of a program is ________.

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

    Which of the following are Advantages of modularization in software design?

    <p>Program can be divided based on functional aspects</p> Signup and view all the answers

    Which of the following is not an element of Requirement Engineering Process?

    <p>Software Requirement Design</p> Signup and view all the answers

    Which type of test determines if the system meets all the requirements (functional and nonfunctional)?

    <p>Acceptance Test</p> Signup and view all the answers

    How is generalization implemented in Object-Oriented software engineering?

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

    All of the following are required to develop an effective test except:

    <p>Skill to a specific programming language</p> Signup and view all the answers

    Use case descriptions commonly contain:

    <p>Precondition, main scenario, alternative scenarios</p> Signup and view all the answers

    Which document is created by a system analyst after the requirements are collected from different stakeholders?

    <p>Software Requirement Specification</p> Signup and view all the answers

    Choose the incorrect statement in terms of Objects.

    <p>Objects can't manage themselves</p> Signup and view all the answers

    Which mechanism allows several objects in a class hierarchy to have different methods with the same name?

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

    ________is a process that translates system specifications into a formal or semi-formal model.

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

    Which of the following is a disadvantage of Object-Oriented Design?

    <p>Objects are difficult to maintain</p> Signup and view all the answers

    If a grammar produces more than one leftmost derivation for a sentence, it is called:

    <p>Ambiguous grammar</p> Signup and view all the answers

    The intersection of a context-free language and a regular language is ________

    <p>context-free</p> Signup and view all the answers

    Which one of the following is not a part of a Turing machine?

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

    The output of a lexical analyzer is ________

    <p>A set of tokens</p> Signup and view all the answers

    Which of the following is NOT a primary role of a code generator in compiler design?

    <p>Declaration of variables</p> Signup and view all the answers

    Which one of the following is different from the others?

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

    When is the type checking usually done?

    <p>During syntax analysis</p> Signup and view all the answers

    Which of the following can NOT represent target Code?

    <p>Byte Code</p> Signup and view all the answers

    Which of the following is NOT an important property of intermediate code representation?

    <p>Register allocation</p> Signup and view all the answers

    Study Notes

    Programming Concepts

    • A variable that stores a reference to another variable is called a pointer.
    • A program that translates a high-level language like C++ to a machine language is called a compiler.
    • A recursive function is a function that calls itself.
    • If a function does not have a return value, its return type is Void.
    • ofstream is a header file that permits writing of data to a file.
    • A global variable is a variable that is available anywhere within a program.

    Object-Oriented Programming

    • A class is a blueprint of an object.
    • The constructor of a class is a special method that is called when an object is created.
    • Private is a visibility modifier that makes methods and data fields accessible only from within its own class.
    • The keyword used to create a subclass/derived class in inheritance is extends.

    Databases

    • Internal Schema defines how and where data are organized in physical data storage.
    • Entity Relationship is applied at the conceptual database design level.
    • The SQL command to define the primary key for an existing table is ALTER TABLE.
    • Normalization is a process of organizing the fields and tables of a database to minimize data redundancy and dependency.

    Computer Architecture

    • Von-Neumann Architecture is a type of computer architecture that uses a single bus to transfer data and instructions.
    • Cache memory is a small, fast memory that stores frequently used data or instructions.
    • Virtual memory is a technique that uses both hardware and software to enable a computer to use more memory than is physically available.

    Data Communication

    • OSI model is a 7-layered framework for designing and implementing computer networks.
    • Segmentation of a data stream happens at the Transport layer of the OSI model.
    • Fiber-optic cable is a type of cable that is not susceptible to Electromagnetic Interference (EMI).

    Algorithms

    • Dynamic Programming is a method of solving complex problems by breaking them down into simpler subproblems.
    • Greedy Algorithm is a method of solving problems by making the locally optimal choice at each step.
    • Breadth-First Search (BFS) is a graph traversal algorithm that traverses a graph in a breadthward motion.

    Web Development

    • Static website is a website that does not change its content unless the actual webpage file is edited.
    • Server-side scripting language is a programming language that runs on a web server to generate dynamic web pages.
    • JavaScript is a client-side scripting language that is used to create interactive web pages.

    Operating Systems

    • Deadlock is a situation where two or more processes are blocked, waiting for each other to release resources.
    • Page fault occurs when a process requests a page that is not in memory.
    • Scheduling algorithms are used to allocate the CPU to different processes.
    • Modularization is a technique of breaking down a program into smaller, independent modules.

    Software Engineering

    • Requirements engineering is the process of defining, analyzing, documenting, and maintaining the requirements of a software system.
    • System testing determines if a system meets the entire requirements (functional and nonfunctional).
    • Aggregation, composition, and generalization are mechanisms of object-oriented design.

    Let me know if you'd like me to expand on any of these topics!

    Studying That Suits You

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

    Quiz Team

    Related Documents

    exitexam demo with answer.pdf

    Description

    This quiz covers basic concepts and terminology in C++ programming, including variables, pointers, and compilers.

    More Like This

    C++ Programming Tutorial
    22 questions
    C++ Programming Basics
    10 questions
    Introduction to Computer Programming
    19 questions

    Introduction to Computer Programming

    LargeCapacitySnowflakeObsidian2219 avatar
    LargeCapacitySnowflakeObsidian2219
    Use Quizgecko on...
    Browser
    Browser