0

programming languages Online Quiz - 35

Description: programming languages Online Quiz - 35
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0
  1. const

  2. volatile

  3. mutable

  4. All the Above

  5. None of the Above


Correct Option: D

Which of the following exists in C++?

  1. virtual destructor

  2. virtual constructor

  3. Both A and B

  4. None of the Above


Correct Option: A
  1. Explicit Instantiation

  2. Implicit instantiation

  3. Both A and B

  4. None of the Above


Correct Option: C
  1. Extraction Operator

  2. Insertion Operator

  3. Scope resolution operator

  4. None of the Above


Correct Option: C

The other name for external variables in C++ is

  1. static variables

  2. register variables

  3. global variables

  4. None of the Above


Correct Option: C
  1. ostream

  2. ifstream

  3. strstream

  4. None of the Above


Correct Option: C
  1. CompilationFails

  2. Will Throw RunTime Error But Code will get Compiled

  3. Throws Linker Error

  4. All the above statements are invalid


Correct Option: A

Is the following statement valid. double price = 7,450.98;

  1. True

  2. False


Correct Option: A

Using pointers to call a function is called as

  1. call by value

  2. call by reference

  3. call by address

  4. All the Above


Correct Option: B

Is python a loosely typed language.?

  1. True

  2. False


Correct Option: A

Which of the following is an invalid data type in python ?

  1. string

  2. complex

  3. double

  4. float


Correct Option: C

AI Explanation

To answer this question, we need to understand the different data types in Python.

In Python, there are several built-in data types, such as integers, floating-point numbers, strings, booleans, lists, tuples, sets, and dictionaries. However, "double" is not a valid data type in Python.

Let's go through each option to understand why it is correct or incorrect:

Option A) string - This option is valid because a string is a sequence of characters in Python and can be represented using single quotes ('') or double quotes ("").

Option B) complex - This option is valid because complex numbers are used to represent numbers in the form of a + bj, where a and b are real numbers, and j is the imaginary unit.

Option C) double - This option is invalid because "double" is not a valid data type in Python.

Option D) float - This option is valid because a float is a floating-point number that represents real numbers and can have a fractional part.

The correct answer is C) double. This option is incorrect because "double" is not a valid data type in Python.

- Hide questions