- Node.js Tutorial
- Node.js - Home
- Node.js - Introduction
- Node.js - Environment Setup
- Node.js - First Application
- Node.js - REPL Terminal
- Node.js - Command Line Options
- Node.js - Package Manager (NPM)
- Node.js - Callbacks Concept
- Node.js - Upload Files
- Node.js - Send an Email
- Node.js - Events
- Node.js - Event Loop
- Node.js - Event Emitter
- Node.js - Debugger
- Node.js - Global Objects
- Node.js - Console
- Node.js - Process
- Node.js - Scaling Application
- Node.js - Packaging
- Node.js - Express Framework
- Node.js - RESTFul API
- Node.js - Buffers
- Node.js - Streams
- Node.js - File System
- Node.js MySQL
- Node.js - MySQL Get Started
- Node.js - MySQL Create Database
- Node.js - MySQL Create Table
- Node.js - MySQL Insert Into
- Node.js - MySQL Select From
- Node.js - MySQL Where
- Node.js - MySQL Order By
- Node.js - MySQL Delete
- Node.js - MySQL Update
- Node.js - MySQL Join
- Node.js MongoDB
- Node.js - MongoDB Get Started
- Node.js - MongoDB Create Database
- Node.js - MongoDB Create Collection
- Node.js - MongoDB Insert
- Node.js - MongoDB Find
- Node.js - MongoDB Query
- Node.js - MongoDB Sort
- Node.js - MongoDB Delete
- Node.js - MongoDB Update
- Node.js - MongoDB Limit
- Node.js - MongoDB Join
- Node.js Modules
- Node.js - Modules
- Node.js - Built-in Modules
- Node.js - Utility Modules
- Node.js - Web Module
- Node.js Useful Resources
- Node.js - Quick Guide
- Node.js - Useful Resources
- Node.js - Dicussion
Node.js Online Quiz
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 - In which of the following areas, Node.js is perfect to use?
B - Data Streaming Applications
Answer : D
Explanation
Node.js is proving itself a perfect technology partner for all of the above mentioned areas.
Q 2 - Which of the following is true about package.json?
A - package.json is present in the root directory of any Node application/module.
B - package.json is used to define the properties of a package.
C - package.json can be used to update dependencies of a Node application.
Answer : D
Explanation
package.json is present in the root directory of any Node application/module and is used to define the properties of a package. It can also be used to update dependencies of a Node application.
Q 3 - Which of the following provides in-built events.
Answer : A
Explanation
Node has multiple in-built events available through events module.
Q 4 - Which of the following statement is valid to use a Node module fs in a Node based application?
Answer : A
Explanation
Require directive is used to load a Node module(fs) and store returned its instance(fs) into its variable(fs).
Q 5 - Which method of fs module is used to truncate a file?
A - fs.delete(fd, len, callback)
B - fs.remove(fd, len, callback)
Answer : C
Explanation
fs.ftruncate(fd, len, callback) is the method which is used to truncate a file.
Q 6 - Which of the following code print the endianness of operating system?
A - console.log('endianness : ' + os.endianness);
B - console.log('endianness : ' + os.endianness());
Answer : B
Explanation
os.endianness() returns the endianness of the CPU. Possible values are "BE" or "LE".
Q 7 - Which of the following is the correct way to get a joint path?
A - path.join('/test', 'test1', '2slashes/1slash', 'tab', '..')
B - path.combine('/test', 'test1', '2slashes/1slash', 'tab', '..')
C - buffer.join('/test', 'test1', '2slashes/1slash', 'tab', '..')
Answer : A
Explanation
path.join([path1][, path2][, ...]) joins all arguments together and normalize the resulting path.
Answer : A
Explanation
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 - Which of the following is true about exec methd of child_process module.
A - The exec() method runs a command in a shell and buffers the output.
Answer : D
Explanation
child_process.exec method runs a command in a shell and buffers the output. It returns a buffer with a max size and waits for the process to end and tries to return all the buffered data at once.
Q 10 - Child processes always have three streams child.stdin, child.stdout, and child.stderr which may be shared with the stdio streams of the parent process.
Answer : A
Explanation
Child processes always have three streams child.stdin, child.stdout, and child.stderr which may be shared with the stdio streams of the parent process.
To Continue Learning Please Login
Login with Google