0

programming languages Online Quiz - 104

Description: programming languages Online Quiz - 104
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

In namespace foo, the function bar can access the variable x also declared in namespace foo? #include namespace foo { void bar() { x++; } int x; } int main(int argc, char** argv) { return 0; }

  1. True

  2. False


Correct Option: B

What is the result of this Integer i1=10; int i2=10; (i1==i2)-->result is

  1. True

  2. False


Correct Option: A

Integer i1=10; Integer i2=10; (i1.equals(i2++))-->result is

  1. true

  2. false

  3. compilation error

  4. exception thrown at runtime


Correct Option: B
  1. Language Integrated Query

  2. Language Independent Query

  3. Language Interrelated Query

  4. None of the above


Correct Option: A
  1. Querying of in-memory collections

  2. Abstraction layer of data sources

  3. Object and Collection Initializers

  4. Lambda expressions


Correct Option: A,B,C
  1. Querying of in-memory collections

  2. Abstraction layer of data sources

  3. Object and Collection Initializers

  4. Lambda expressions


Correct Option: A,B,C

What will happen when you attempt to compile and run the following code? int Output = 10; boolean b1 = false; if((b1 == true) && ((Output += 10) == 20)) { System.out.println("We are equal " + Output); } else { System.out.println("Not equal! " + Output); }

  1. Compilation and output of "Not equal! 10".

  2. Compilation and output of "Not equal! 20".

  3. Compilation and output of "We are equal 10".

  4. Compilation error, attempting to perform binary comparison on logical data type.


Correct Option: A
- Hide questions