Tag: programming languages

Questions Related to programming languages

  1. unsigned int

  2. char

  3. Float

  4. None of the Above


Correct Option: C
  1. Yes

  2. No

  3. Only optimized compilers will compile C++ code.

  4. None of the Above


Correct Option: B
  1. The snippet is illegal

  2. It loops forever

  3. It is ignored by compiler, but it is not illegal

  4. None of the Above


Correct Option: B
  1. Copies "This" into an_array

  2. Adds "This" to the end of an_array

  3. Compares an_array and "This"

  4. None of the Above


Correct Option: B
Explanation:

To understand what the code strcat(an_array, "This") does, we need to know that strcat() is a function in C language that concatenates (joins) two strings.

The function takes two arguments: the first argument is the destination array (where the concatenated string will be stored), and the second argument is the source string (which will be concatenated to the destination array).

In this case, the function call strcat(an_array, "This") concatenates the string "This" to the end of the string already stored in an_array. Therefore, the correct option is:

The Answer is: B. Adds "This" to the end of an_array

  1. public

  2. protected

  3. guarded

  4. None of the Above


Correct Option: C
  1. class aclass : public superclass

  2. class aclass inherit superclass

  3. class aclass

  4. None of the Above


Correct Option: A
  1. Breaks out of the if statement

  2. Exits the function

  3. Nothing (Compiler error)

  4. None of the Above


Correct Option: C