1.Which function is used to include modules in Node Js.
A. include(); B. require(); C. attach();
2.Which of following is not builtin node module.
A. zlib B. https C. dgram D. fsread
3.How Node.js modules are availble externally
A. module.exports B. module.spread C. module.expose D. None of Above
4.Command to list all modules that are install globally?
A. $ npm ls -g B. $ npm ls C. $ node ls -g
5.Which of the following module is required for path specific operations ?
A.Os module B. Path module C. Fs module D. All of the above.
6. Which of the following are Node.js streams types?
A. Writable B. Duplex C. Readable D. All of the above
7.How do you install Nodemon using Node.js?
A. npm install -g nodemon B. node install -g nodemon
8.Which of the following module is required to create a web server?
A. url module B.net module C.http module D.Web module
9.Which of the following is true about readable stream?
A. Readable stream is used for read operation
B.Output of readable stream can be input to a writable stream
C.Both of the above
D.None of the above
10.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.
11.Which of the following code converts a buffer buf to JSON object?
A .buf.toJSON() B . buf.json()
C - buf.covertToJson()D .buf.jsonify()
12.Which of the following is true about chaining streams?
B .Chanining is normally used with piping operations.
13.Which of the following method resolves an ip address to an array of hostnames?
B .dns.resolve(hostname[, rrtype], callback)
C .dns.resolve4(hostname, callback)
14.Which of the following is true about external binding with respect to domain module?
A .Error emmitter is executing its code within run method of a domain.
B . Error emmitter is added explicitly to a domain using its add method.
15.Duplex stream can be used for both read and write operation.
0 Comments