Server Side And Client Side Scripting Questions MCQs


server side and client side scripting Questions

Total Questions : 80

Page 1 of 4 pages
Question 1. What are the events generated by the Node objects called?
  1.    generators
  2.    emitters
  3.    dispatchers
  4.    highevents
Answer: Option B
Question 2. What is the function used to remove all handlers for name events?
  1.    deleteAllListeners(name)
  2.    deleteListener(name,f)
  3.    removerListener(name,f)
  4.    removeAllListeners(name)
Answer: Option D
Question 3. What is the function used to deregister event handler ‘f’?
  1.    deleteAllListeners(name)
  2.    deleteListener(name,f)
  3.    removerListener(name,f)
  4.    removeAllListeners(name)
Answer: Option C
Question 4. Which of the following is an event emitter?
  1.    once
  2.    process
  3.    listeners
  4.    on
Answer: Option B
Question 5. Which function is a synonym for on()?
  1.    addListener()
  2.    listeners()
  3.    once()
  4.    add()
Answer: Option A
Question 6. When do uncaught exceptions generate events?
  1.    When handlers are registered
  2.    When handlers are deregistered
  3.    When handler functions are called
  4.    When handlers do not have a matching catch clause
Answer: Option A
Question 7. Which among the following POSIX signals generate events?
  1.    SIGDOWN
  2.    SIGFLOAT
  3.    SIGINT
  4.    SIGSHORT
Answer: Option C
Question 8. When the “end” event fires on EOF when no more data will arrive, which function is called?
  1.    s.on("data",f);
  2.    s.on("end",f);
  3.    s.on("error",f);
  4.    s.on("default",f);
Answer: Option B
Question 9. What is the method used to pause “data” events?
  1.    s.pause();
  2.    s.stop();
  3.    s.halt();
  4.    s.wait();
Answer: Option A
Question 10. What will be the return value of the write() method when the Node cannot write the data immediately and has to buffer it internally?
Answer: Option A
Question 11. Rhino is originated by
  1.    Microsoft
  2.    Mozilla
  3.    Apple
  4.    None of the mentioned
Answer: Option B
Question 12. Which of the following reads the textual contents of a URL and returns as a string?
  1.    spawn(f);
  2.    load(filename,…);
  3.    readFile(file);
  4.    readUrl(url);
Answer: Option D
Question 13. Which of the following are global functions that are not part of core JavaScript?
  1.    spawn(f);
  2.    trim();
  3.    exult();
  4.    none of the mentioned
Answer: Option A
Question 14. Which is a useful way to try out small and simple Rhino programs and one-liners?
  1.    Starting an interative shell
  2.    Starting a one to one shell
  3.    Creating a thread to do simple programs
  4.    None of the mentioned
Answer: Option A
Question 15. Which Rhino command quits Rhino environment?
  1.    terminate()
  2.    exit()
  3.    quit()
  4.    close()
Answer: Option C
Question 16. Which is a more formal way of importing packages and classes as JavaScript objects?
  1.    import(java.util.*);
  2.    importClass(java.util.*);
  3.    import.Class(java.util.*);
  4.    Class.import(java.util.*);
Answer: Option B
Question 17. Consider the following code snippet
var f = new java.io.File("/tmp/test");
var out = new java.io.FileWriter(f);
out instanceof java.io.Reader
What will be the output for the above code snippet?
  1.    Error
  2.    True
  3.    Exception
  4.    False
Answer: Option D
Question 18. What does Rhino do when the getter and setter methods exist?
  1.    It becomes JavaScript properties
  2.    Java classes are used to avoid them
  3.    Java classes & JavaScript properties
  4.    None of the mentioned
Answer: Option A
Question 19. The JavaScript classes can be instantiated using _____ operator?
  1.    create
  2.    new
  3.    instantiate
  4.    create.new
Answer: Option B
Question 20. The new Java arrays can be created into a JavaScript programs using which of the following classes?
  1.    java.Array
  2.    java.lang.*
  3.    java.lang.Array
  4.    java.lang.reflect.Array
Answer: Option D