C/C++ Programming Language - Set 3

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Mcqquestions
M
Mcqquestions
Community Contributor
Quizzes Created: 23 | Total Attempts: 619,993
Questions: 10 | Attempts: 7,462

SettingsSettingsSettings
C/C++ Programming Language - Set 3 - Quiz

Online MCQ Quiz on C/C++ Programming - Set 3 No. Of Questions:- 10 Time:- 10 Minutes Full Mark:- 100 Pass Mark:- 70 This Quiz is for those user who wants to test their knowledge/skill in C/C++ Programming Language. For more MCQ Questions and Online Quizzes please visit https://www. McqQuestions. Com


Questions and Answers
  • 1. 

    “C” was primarily developed as a

    • A.

      Systems Programing Language

    • B.

      General Purpose Language

    • C.

      Data Processing Language

    • D.

      None

    Correct Answer
    A. Systems Programing Language
    Explanation
    "C" was primarily developed as a systems programming language. This means that it was designed to be used for low-level programming tasks, such as operating systems development and hardware control. It provides low-level access to memory and hardware, making it suitable for tasks that require direct control over the computer's resources. While "C" can also be used for general-purpose programming, its origins and design make it particularly well-suited for systems programming. It is not specifically designed for data processing or any other specific purpose.

    Rate this question:

  • 2. 

    “C” is a

    • A.

      High Level Language

    • B.

      Low Level Language

    • C.

      High Level Language with some low level features

    • D.

      Low level language with some high level features

    Correct Answer
    C. High Level Language with some low level features
    Explanation
    The given answer suggests that "C" is a high-level language with some low-level features. This means that while "C" primarily operates at a high level of abstraction, allowing for easier programming and readability, it also incorporates some low-level features that provide direct access to hardware and memory. These low-level features give programmers more control and efficiency when needed, making "C" a versatile language suitable for both high-level and low-level programming tasks.

    Rate this question:

  • 3. 

    Most suitable option for  “C” literal is

    • A.

      A string

    • B.

      A string constant

    • C.

      A character

    • D.

      An alphabet

    Correct Answer
    B. A string constant
    Explanation
    The most suitable option for the "C" literal is a string constant. This is because a string constant is a sequence of characters enclosed in double quotation marks, which is the appropriate representation for the "C" literal. A string, on the other hand, refers to a data type that can hold a sequence of characters, but it does not specify that it is a constant value. A character and an alphabet are both individual characters, which do not match the requirement of representing the "C" literal.

    Rate this question:

  • 4. 

    Length of the string “Correct” is

    • A.

      7

    • B.

      8

    • C.

      6

    • D.

      Implementation dependent

    Correct Answer
    A. 7
    Explanation
    The length of a string is determined by the number of characters it contains. In this case, the string "Correct" has 7 characters, so the correct answer is 7.

    Rate this question:

  • 5. 

    Choose the correct statement

    • A.

      An identifier may start with an underscore

    • B.

      An identifier may end with an underscore

    • C.

      IF is a valid identifier

    • D.

      All

    Correct Answer
    D. All
    Explanation
    All of the given statements are correct. An identifier may start with an underscore, it may end with an underscore, and "IF" is a valid identifier.

    Rate this question:

  • 6. 

    The “const” feature can be applied to

    • A.

      An identifier

    • B.

      An array

    • C.

      An array argument

    • D.

      All

    Correct Answer
    D. All
    Explanation
    The "const" feature can be applied to all of the options listed: an identifier, an array, and an array argument. This means that you can use the "const" keyword to declare a constant identifier, a constant array, or a constant array argument in a function.

    Rate this question:

  • 7. 

    Pick the operator that associate from the left

    • A.

      +

    • B.

      ,

    • C.

    • D.

      All

    Correct Answer
    D. All
    Explanation
    The correct answer is "All" because all the operators listed in the question (+ and ,) associate from the left. Associativity refers to the order in which operators of the same precedence are evaluated. Left associativity means that the operators are evaluated from left to right. In this case, both + and , operators follow left associativity, so "All" is the correct answer.

    Rate this question:

  • 8. 

    Choose the correct statement

    • A.

      Constant expressions are evaluated at compile time

    • B.

      String constants can be concatenated at compile time

    • C.

      Size of array must be known at compile time

    • D.

      All

    Correct Answer
    D. All
    Explanation
    All of the statements given are correct. Constant expressions are indeed evaluated at compile time, meaning that their values are determined before the program is run. String constants can be concatenated at compile time, allowing for efficient string manipulation. The size of an array must be known at compile time, as the compiler needs this information to allocate the appropriate amount of memory for the array. Therefore, all of the statements are true.

    Rate this question:

  • 9. 

    Pick the operator that associate from the right

    • A.

      ? :

    • B.

      + =

    • C.

      =

    • D.

      All

    Correct Answer
    D. All
    Explanation
    The correct answer is "All." This means that all of the operators listed in the question associate from the right. Associativity refers to the order in which operators of the same precedence are evaluated in an expression. Operators that associate from the right are evaluated from right to left. Therefore, in this case, all the operators listed will be evaluated from right to left.

    Rate this question:

  • 10. 

    Which of the following comments about the “++” operator are correct?

    • A.

      It is a unary operator

    • B.

      It cannot be applied to an expression

    • C.

      It associates from the right

    • D.

      All

    Correct Answer
    D. All
    Explanation
    All of the given comments about the "++" operator are correct. The "++" operator is a unary operator, meaning it operates on a single operand. It is used to increment the value of a variable by 1. It can be applied to an expression, such as a variable or a constant. It associates from the right, which means that if there are multiple "++" operators in an expression, the rightmost one will be evaluated first.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Sep 22, 2012
    Quiz Created by
    Mcqquestions
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.