Sail E0 Webinar

MCQs

Total Questions : 82 | Page 5 of 9 pages
Question 41. What are the three important manipulations done in a for loop on a loop variable?
  1.    Updation, Incrementation, Initialization
  2.    Initialization,Testing, Updation
  3.    Testing, Updation, Testing
  4.    Initialization,Testing, Incrementation
 Discuss Question
Answer: Option B. -> Initialization,Testing, Updation
Question 42. Consider the following code snippet
function tail(o)
{
for (; o.next; o = o.next) ;
return o;
}
Will the above code snippet work? If not, what will be the error?
  1.    No, this will throw an exception as only numerics can be used in a for loop
  2.    No, this will not iterate
  3.    Yes, this will work
  4.    No, this will result in a runtime error with the message “Cannot use Linked List”
 Discuss Question
Answer: Option C. -> Yes, this will work
Question 43. One of the special feature of an interpreter in reference with the for loop is that
  1.    Before each iteration, the interpreter evaluates the variable expression and assigns the name of the property
  2.    The iterations can be infinite when an interpreter is used
  3.    The body of the loop is executed only once
  4.    All of the mentioned
 Discuss Question
Answer: Option A. -> Before each iteration, the interpreter evaluates the variable expression and assigns the name of the property
Question 44. What will happen if the body of a for/in loop deletes a property that has not yet been enumerated?
  1.    The property will be stored in a cache
  2.    The loop will not run
  3.    That property will not be enumerated
  4.    All of the mentioned
 Discuss Question
Answer: Option C. -> That property will not be enumerated
Question 45. What will be the step of the interpreter in a jump statement when an exception is thrown?
  1.    The interpreter stops its work
  2.    The interpreter throws another exception
  3.    The interpreter jumps to the nearest enclosing exception handler
  4.    None of the mentioned
 Discuss Question
Answer: Option C. -> The interpreter jumps to the nearest enclosing exception handler
Question 46. Consider the following code snippet
function f(o)
{
if (o === undefined) debugger;
}
What could be the task of the statement debugger?
  1.    It does nothing but a simple breakpoint
  2.    It debugs the error in that statement and restarts the statement’s execution
  3.    It is used as a keyword that debugs the entire program at once
  4.    All of the mentioned
 Discuss Question
Answer: Option A. -> It does nothing but a simple breakpoint
Question 47. Consider the following code snippet
while (a != 0)
{
if (spam>a == 1)
continue;
else
  1.    The continue keyword restarts the loop
  2.    The continue keyword skips the next iteration
  3.    The continue keyword skips the rest of the statements in that iteration
  4.    None of the mentioned
 Discuss Question
Answer: Option C. -> The continue keyword skips the rest of the statements in that iteration
Question 48. The unordered collection of properties, each of which has a name and a value is called
  1.    String
  2.    Object
  3.    Serialized Object
  4.    All of the mentioned
 Discuss Question
Answer: Option B. -> Object
Question 49. Among the keywords below, which one is not a statement?
  1.    debugger
  2.    with
  3.    if
  4.    use strict
 Discuss Question
Answer: Option D. -> use strict
Question 50. The object has three object attributes namely
  1.    Class, parameters, object’s extensible flag
  2.    Prototype, class, objects’ parameters
  3.    Prototype, class, object’s extensible flag
  4.    Native object, Classes and Interfacces and Object’s extensible flag
 Discuss Question
Answer: Option C. -> Prototype, class, object’s extensible flag

Latest Videos

Latest Test Papers