Q. What is use of underscore variable in REPL session ?
- None of the options
- To get the last command used.
- To get the last result.
- To store the result.
Q. Which method of fs module is used to close a file ?
- None of the options.
- fs.closeFile(fd, callback)
- fs.closePath(fd, callback)
- fs.close(fd, callback)
Q. Which of the following is true about EventEmitter.emit property ?
- emit property is used to fire an event.
- None of the options.
- emit property is used to bind a function with the event.
- emit property is used to locate an event handler.
Q. Which method of fs module is used to truncate a file ?
- None of the options.
- fs.delete(fd, len, callback)
- fs.ftruncate(fd, len, callback)
- fs.remove(fd, len, callback)
Q. Which of the following is true about EventEmitter.on property ?
- None of the options.
- on property is used to locate an event handler.
- on property is used to fire event.
- on property is used to bind a function with the event.
Q. Which method of fs module is used to write a file?
- fs.write(path, flags[, mode], callback)
- fs.writeFile(path, flags[, mode], callback)
- None of the options
- fs.writePath(path, flags[, mode], callback)
Q. A stream fires end event when there is no more data to read. Is this correct ?
Q. Which of the following command will show all the modules installed locally ?
- $ node ls -g
- $ npm ls
- $ node ls
- $ npm ls -g
Q. REPL stands for
- Read Eval Print Loop
- Read Earn Point Learn
- Research Eval Program Learn.
- Read Eval Point Loop
Q. Print the relative path of your script using the pre defined global object
- console.log('filename');
- console.log(/filename);
- console.log(__filename);
- console.log(__dirname); 9)
Q. Which of the following is true about console global object ?
- There are built-in methods to be used for printing informational, warning and error messages in console.
- All the options.
- console is used in asynchronous way when the destination is a pipe.
- None of the options.
- console is used in synchronous way when destination is file or a terminal.
Q. How Node based servers are different from traditional web servers ?
- There is no much difference between the two.
- None of the options.
- Node based server process request much faster than traditional server
- Node based server uses a single threaded model and can services much larger number of requests than traditional server like Apache HTTP Server.
Q. What is node.js ?
- Node.js is a java based framework.
- one of the options.
- Node.js is a JavaScript based Framework /platform build on Google Chrome's JavaScript V8 engine.
- Node.js is a web server.
Q. Which of the following is true about node.js ?
- Node.js is used to develop I/O intensive web applications like a video streaming sites, single page applications and other web application.
- Node.js is open source and is completely free to use.
- None of the options.
- Node.js is a JavaScript based Framework / platform built on Google Chrome JavaScript VB engine.
- All the options.
Q. Which of the following is true about file I/O in Node application ?(I) node implements file I/O using simple rappers around standard POSIX functions.(II) node file system (fs) module should be imported from file I/O operations.
- I
- I & II
- None of the options
- II
Q. Which of the following is true about restful Web Services ? (I) Web Services based on REST architecture are known as our RESTful Web Services.(II) Web Services uses HTTP methods to implement the concept of REST architecture.
- I & II
- None of the options.
- I
- II
Q. Which of the following module is required for operating system specific operations?
- os module
- fs module
- Net module
- None of the options.
Q. Which of the following statement is valid to use a node module http in a node based application ?
- var http = require ("http");
- var http = import("http");
- Package http;
- Import http;
Q. Which of the following is true about __dirname global objects ? (i) The __dirname represents the name of the directory that the currently executing scripts resides in. (ii) The __dirname represents the resolved absolute path of code file.
- i & ii
- None of the options.
- ii
- i