0

programming languages Online Quiz - 265

Description: programming languages Online Quiz - 265
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0
  1. Reuse your Schema in other Schemas

  2. Create your own data types derived from the standard types

  3. Reference multiple schemas in the same document

  4. All the above


Correct Option: D
    1. May 2001
    1. May 2001
    1. May 2000
    1. May 2002

Correct Option: A
  1. empty elements

  2. elements that contain only other elements

  3. elements that contain only text

  4. elements that contain only numbers


Correct Option: D

Evaluate: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7);

  1. 10

  2. 11

  3. 1

  4. 0


Correct Option: B

What does the following code do: int c=0; cout<

  1. Undefined

  2. 01

  3. 00

  4. 10


Correct Option: A

What does the following do: void afunction(int *x) { x=new int; *x=12; } int main() { int v=10; afunction(&v); cout<

  1. Outputs 12

  2. Outputs 10

  3. Outputs the address of v

  4. Undefined


Correct Option: B

Can we have a virtual constructor for a class?

  1. True

  2. False


Correct Option: B
  1. There is none; they both work as expected

  2. They both do nothing.

  3. The first will not invoke all myObj destructors

  4. It would'nt delete all the memory allocated to the objects


Correct Option: C

Which of the following gives the memory address of a pointer a?

  1. a

  2. *a

  3. &a

  4. address(a)


Correct Option: A
  1. cin.getline(x, 100, '\n');

  2. cin.getline(100, x, '\n');

  3. readline(x, 100, '\n');

  4. read(x);


Correct Option: A
  1. the number of arguments

  2. the number of arguments plus one

  3. the number of arguments minus one

  4. The total size of the argument array


Correct Option: B
- Hide questions