0% found this document useful (0 votes)
11 views3 pages

Node.js Intern Test Questions and Tasks

The document outlines a Node.js intern test consisting of three parts: multiple choice questions covering web fundamentals, server and backend knowledge, and logic & algorithms; coding questions requiring functions to count words and find subarrays; and SQL questions involving queries on user and student tables. The test includes a total of 20 multiple choice questions and additional coding and SQL tasks. The total time allocated for the test is 60 minutes.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views3 pages

Node.js Intern Test Questions and Tasks

The document outlines a Node.js intern test consisting of three parts: multiple choice questions covering web fundamentals, server and backend knowledge, and logic & algorithms; coding questions requiring functions to count words and find subarrays; and SQL questions involving queries on user and student tables. The test includes a total of 20 multiple choice questions and additional coding and SQL tasks. The total time allocated for the test is 60 minutes.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Node.

js Intern Test

Total Time: 60 minutes

Part 1: Multiple Choice Questions (20 Questions)

A. Web Fundamentals (HTML/CSS/JavaScript) – 8 questions

1. What tag is used to create a link in HTML?


A. <a> B. <link> C. <url> D. <href>

2. What is the correct way to include an external CSS file in HTML?


A. <css src="[Link]">

B. <style href="[Link]">

C. <link rel="stylesheet" href="[Link]">

D. <script src="[Link]">

3. Which CSS property controls the spacing between elements?


A. padding

B. margin

C. border-spacing

D. space

4. What is the result of [Link](0 == false) in JavaScript?


A. true B. false C. undefined D. Error

5. Which keyword declares a block-scoped variable in JS?


A. var B. block C. let D. const

6. What is the purpose of async / await in JavaScript?


A. Looping syntax

B. Better JSON parsing

C. Handling asynchronous code

D. DOM manipulation

7. How to select an element with class `card` in CSS?


A. #card B. .card C. card D. *card

8. What does [Link]() do?


A. Parses JSON string to object

B. Converts object to string

C. Removes white spaces from JSON

D. Formats date

B. Server & Backend Knowledge – 7 questions


9. Which protocol is used for communication between client and server over the web?
A. FTP B. SMTP C. HTTP D. SSH

10. Which port does HTTP use by default?


A. 21 B. 80 C. 443 D. 22

11. What does REST stand for?


A. Recursive State Transfer

B. Representational State Transfer

C. Representational Secure Transfer

D. Reduced Server Time

12. What is the purpose of a reverse proxy like Nginx?


A. Hide frontend logic

B. Store static files

C. Forward client requests to backend services

D. Redirect emails

13. Which database is considered NoSQL?


A. MySQL B. PostgreSQL C. MongoDB D. SQLite

14. What HTTP method is idempotent and used for retrieving data?
A. GET B. POST C. PATCH D. PUT

15. What does status code 500 represent in HTTP?


A. Not Found

B. Internal Server Error

C. Unauthorized

D. Moved Permanently

C. Logic & Algorithm – 5 questions

16. What is the time complexity of accessing an element in an array by index?


A. O(n) B. O(1) C. O(log n) D. O(n²)

17. What data structure uses FIFO (First In First Out)?


A. Stack B. Queue C. Tree D. Set

18. Which scenario requires a hash map?


A. Sorting numbers

B. Finding duplicate elements fast

C. Implementing recursion

D. Binary search

19. Which sorting algorithm has the best average-case performance?


A. Bubble Sort

B. Selection Sort
C. Quick Sort

D. Insertion Sort

20. Which of the following is used to avoid race conditions?


A. Callback B. Mutex / Lock C. Event loop D. Polling

Part 2: Coding Questions (pseudocode or code)

1. Write a function `countWords(str)` that returns the number of words in the string.
Example: countWords("[Link] is powerful") // Output: 3

2. Given an array of integers and a target sum `k`, return the subarray that adds up to `k`.
Example: findSubarray([1, 2, 3, 4, 5], 9) // Output: [2, 3, 4]

Part 3: SQL Questions

1. Given tables `users(id, name)` and `orders(id, user_id, amount)`, write a query to return each
user’s name and total amount spent.

2. Given a table `students(id, name, score)`, write a query to find the student with the highest score.

You might also like