Following quiz provides Multiple Choice Questions (MCQs) related to Node.js Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which of the following statement is valid to use a Node module http in a Node based application?
Require directive is used to load a Node module(http) and store returned its instance(http) into its variable(http).
Q 2 -What npm stands for?
npm stands for Node Package Manager.
Q 3 - Which of the following code gets length of a buffer buf?
buf.length returns size of a node buffer in bytes.
Q 4 - Which method of fs module is used to read a file?
fs.read(fd, buffer, offset, length, position, callback) is the method which is used to read a file.
Q 5 - Which method of fs module is used to truncate a file?
fs.ftruncate(fd, len, callback) is the method which is used to truncate a file.
The process object is a global object and can be accessed from anywhere.
Q 7 - Which of the following code print the total system memory of operating system?
os.totalmem() returns the total amount of system memory in bytes.
net.isIP(input) tests if input is an IP address. Returns 0 for invalid strings, returns 4 for IP version 4 addresses, and returns 6 for IP version 6 addresses.
Q 9 - What is Express?
Express is a minimal and flexible Node.js web application framework that provides a robust set of features to develop web and mobile applications.
Each type of Stream is an EventEmitter instance and throws several events at different instance of times.