0% found this document useful (0 votes)
34 views12 pages

Bed ST1

The document contains 31 multiple choice questions about Node.js topics such as installing packages, reading and writing files, HTTP methods, middleware, and more. Each question has 4 possible answers with one correct answer.

Uploaded by

Ishita Jindal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views12 pages

Bed ST1

The document contains 31 multiple choice questions about Node.js topics such as installing packages, reading and writing files, HTTP methods, middleware, and more. Each question has 4 possible answers with one correct answer.

Uploaded by

Ishita Jindal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Download | CodeQuotient https://test.codequotient.com/test/getTestContentFile/65432274d6996b...

CODEQUOTIENT

PAPER OF BED-ST1-B2021-SEM5 EXAM

Q1. MCQ-1MARKS-BED

How can we expose node modules?

exports
imports
expose

Ans : exports

Q2. MCQ-1MARKS-BED

Which of the following is a valid HTTP method?

get()
put()
patch()
send()

Ans : get(), put(), patch()

Q3. MCQ-1MARKS-BED

is the possible to convert csv data to array of objects?

true
false

Ans : true

1 of 12 28-11-2023, 12:35 pm
Download | CodeQuotient https://test.codequotient.com/test/getTestContentFile/65432274d6996b...

Q4. MCQ-1MARKS-BED

how do you install express in node?

npm i express
npm install express
npm download express
node install express

Ans : npm i express, npm install express

Q5. MCQ-1MARKS-BED

if you want to read .csv file data then which module would you prefer?

file system
file service
csv system

Ans : file system

Q6. MCQ-1MARKS-BED

which package would you use to connect server to mongodb?

mongoose
mongodb
mg hector

Ans : mongoose, mongodb

Q7. MCQ-1MARKS-BED

how do you read data from a file in nodejs?

fs.readFile
fs.readFileSync
fs.readFileAsync
fs.read

2 of 12 28-11-2023, 12:35 pm
Download | CodeQuotient https://test.codequotient.com/test/getTestContentFile/65432274d6996b...

Ans : fs.readFile, fs.readFileSync

Q8. MCQ-1MARKS-BED

how do you call a middleware?

app.use(middleware())
app.get('route', middleware, (req, res) =>{})
app.Call(middleware)

Ans : app.use(middleware()), app.get('route', middleware, (req, res) =>{})

Q9. MCQ-1MARKS-BED

In nodejs when we read from a file then in what form we get the data?

HTML
string
text
buffer

Ans : buffer

Q10. MCQ-1MARKS-BED

which of these is not a function of blob?

stream()
text()
clear()

Ans : clear()

Q11. MCQ-1MARKS-BED

3 of 12 28-11-2023, 12:35 pm
Download | CodeQuotient https://test.codequotient.com/test/getTestContentFile/65432274d6996b...

Which node module is used for zip and unzip functionalities?

zlib
ulib
vlib
zipLIb

Ans : zlib

Q12. MCQ-1MARKS-BED

_____ is a software service that allows 2 or more applications to talk to each other?

API
client-server
rest
All of the above

Ans : API

Q13. MCQ-1MARKS-BED

which package is used to allow cross origin requests?

cors
express
ALLRequest

Ans : cors

Q14. MCQ-1MARKS-BED

in app.get(c1, c2), what is c1 and c2?

c1 is route , c2 is callback
c1 is callback , c2 is route
both are callback
c1 is a variable and c2 is a route

Ans : c1 is route , c2 is callback

4 of 12 28-11-2023, 12:35 pm
Download | CodeQuotient https://test.codequotient.com/test/getTestContentFile/65432274d6996b...

Q15. MCQ-1MARKS-BED

Which of the following are the benefits of using modules?

dividing up tasks
reusing functions
improves testing cycle
All of the above

Ans : All of the above

Q16. MCQ-1MARKS-BED

Which of the following are NodeJS global objects?

__dirname
__filename
BUffer
All of the above

Ans : All of the above

Q17. MCQ-1MARKS-BED

which function is used to fire an event?

fire()
emit()

Ans : emit()

Q18. MCQ-1MARKS-BED

Which of the following parameters is taken by the buffer.toString method?

encoding
start
end
5 of 12 28-11-2023, 12:35 pm
Download | CodeQuotient https://test.codequotient.com/test/getTestContentFile/65432274d6996b...

all of the above

Ans : all of the above

Q19. MCQ-1MARKS-BED

what is the fullform of REPL?

Read Eccess Program Loop


Read Eval Print Loop
Rat elephant parrot lion

Ans : Read Eval Print Loop

Q20. MCQ-1MARKS-BED

NodeJS is supported on which of the following platforms?

unix
macos
linux
All of the above

Ans : All of the above

Q21. MCQ-1MARKS-BED

Which of the following module is required to create a web server?

url
http
.net
web

Ans : http

Q22. MCQ-1MARKS-BED

6 of 12 28-11-2023, 12:35 pm
Download | CodeQuotient https://test.codequotient.com/test/getTestContentFile/65432274d6996b...

Which of the following template engines can be used with Node.js?

jade
handlebars
caption

Ans : handlebars

Q23. MCQ-1MARKS-BED

Which of the following method is used to return the current working directory of the process?

cwd()
pwd()

Ans : cwd()

Q24. MCQ-1MARKS-BED

Which of the following statement is used to execute the code of the sample.js file?

1.

sample.js
node sample.js
nodejs sample.js

Ans : node sample.js

Q25. MCQ-1MARKS-BED

7 of 12 28-11-2023, 12:35 pm
Download | CodeQuotient https://test.codequotient.com/test/getTestContentFile/65432274d6996b...

How many Node object methods are available?

1.

21
18
19
20

Ans : 18

Q26. MCQ-1MARKS-BED

Which of the following is used to test if two nodes are equal?

==
equal()
isequaNode()

Ans : isequaNode()

Q27. MCQ-1MARKS-BED

Which of the following tool is used to automate the various tasks of the Node.js application?

1. Express.js
2. GruntJS
3. NPM
4. None of the above

express.js
grunt.js
NPM

Ans : grunt.js

8 of 12 28-11-2023, 12:35 pm
Download | CodeQuotient https://test.codequotient.com/test/getTestContentFile/65432274d6996b...

Q28. MCQ-1MARKS-BED

Which of the following method is used to compare the placement of two nodes in the DOM hierarchy
(document)?

cloneNode()
compareDocumentPosition()
getFeature()

Ans : compareDocumentPosition()

Q29. MCQ-1MARKS-BED

1. Which of the following method can append specified content to a file?


2.

fs.appendFile()
fs.addFile()
fs.writeFile()

Ans : fs.appendFile()

Q30. MCQ-1MARKS-BED

The buffer class is a global class that can be accessed without importing a buffer module.

true
false

Ans : true

Q31. MCQ-1MARKS-BED

Which of the following command is used to start a REPL session?

9 of 12 28-11-2023, 12:35 pm
Download | CodeQuotient https://test.codequotient.com/test/getTestContentFile/65432274d6996b...

node
node repl
node start

Ans : node

Q32. MCQ-1MARKS-BED

In which language is Node.js written?

java
coffeeScript
c++

Ans : c++

Q33. MCQ-1MARKS-BED

which of the following is a method in momgoDB Collection?

find()
getAll()
saveAll()

Ans : find()

Q34. MCQ-1MARKS-BED

how do you split a csv file initially?

using .split('\r\n')
using .split('\r\0')
using .split('\r\ro')

Ans : using .split('\r\n')

10 of 12 28-11-2023, 12:35 pm
Download | CodeQuotient https://test.codequotient.com/test/getTestContentFile/65432274d6996b...

Q35. MCQ-1MARKS-BED

Which of the following is used to send email in Node.js?

nodemailer
email.js
emailSender()

Ans : nodemailer

Q36. MCQ-1MARKS-BED

Which of the following is used to create and manage web sockets in Node.js?

socket.io
websockets.node
websockets.js

Ans : socket.io

Q37. MCQ-1MARKS-BED

Which of the following is used to parse and manipulate HTML in Node.js?

cheerio
jsdom
classicDom

Ans : cheerio, jsdom

Q38. MCQ-1MARKS-BED

Which of the following is used to create integration tests in Node.js?

SuperTest
Frisby
kite.js

Ans : SuperTest, Frisby

11 of 12 28-11-2023, 12:35 pm
Download | CodeQuotient https://test.codequotient.com/test/getTestContentFile/65432274d6996b...

Q39. MCQ-1MARKS-BED

Which of the following is used to create package managers in Node.js?

npm
pnpm
yarn

Ans : npm, pnpm, yarn

Q40. MCQ-1MARKS-BED

Which of the following is used to create linters in Node.js?

esLint
jsHint
standard

Ans : esLint, jsHint, tandard

12 of 12 28-11-2023, 12:35 pm

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy