Home
You may like this!
1.
You want to declare an integer variable called myVar and assign it the value 0. How can you accomplish this?

  • A.
    declare myVar as 0;
  • B.
    myVar = 0;
  • C.
    int myVar = 0
  • D.
    int myVar = 0;
  • Answer & Explanation
  • Report
Answer : [B]
Explanation :
Report
Name Email  
2.
You need to make a logical comparison where two values must return true in order for your code to execute the correct statement. Which logical operator enables you to achieve this?
  • A.
    AND
  • B.
    |
  • C.
    &
  • D.
    &&
  • Answer & Explanation
  • Report
Answer : [D]
Explanation :
Report
Name Email  
3.
What kind of result is returned in the condition portion of an if statement?
  • A.
    Boolean
  • B.
    Integer
  • C.
    Double
  • D.
    String
  • Answer & Explanation
  • Report
Answer : [A]
Explanation :
Report
Name Email  
4.
What are the keywords supported in an if statement?
  • A.
    if, else, else-if, return
  • B.
    if, else, else if
  • C.
    if, else, else if, break
  • D.
    if, else, default
  • Answer & Explanation
  • Report
Answer : [B]
Explanation :
Report
Name Email  
5.
In the following code sample, will the second if structure be evaluated?

bool condition = true;
if(condition)
if(5 < 10)
Console.WriteLine("5 is less than 10);
  • A.
    Yes
  • B.
    No
  • Answer & Explanation
  • Report
Answer : [A]
Explanation :
Report
Name Email