Admin Dashboard

Result for: GIDHAD VIDYA DHANAJI

Exam Name MERN STACK
Total Marks 47.0
Score 17.0
Percentage 36.17%
Question Analysis
Sr. No. Question Selected Answer Correct Answer
1 What is the primary purpose of the useState hook in React? To define the HTML structure To manage local component state
2 When does a useEffect hook with an empty dependency array [] run? Whenever the state updates Only once after the initial mount
3 Why does React use a Virtual DOM? To optimize UI updates by minimizing direct DOM manipulation To optimize UI updates by minimizing direct DOM manipulation
4 How are lifecycle events handled in functional components? Using Hooks (e.g., useEffect) Using Hooks (e.g., useEffect)
5 In Redux, what is the role of a "Reducer"? To store the entire UI state To update state based on actions as a pure function
6 What is the best way to pass data from a child component to a parent? Using Callback functions as props Using Callback functions as props
7 What is the importance of the key prop when rendering lists in React? To execute loops faster To help React identify which items have changed or moved
8 When should you use React.memo? To prevent unnecessary re-renders of a component To prevent unnecessary re-renders of a component
9 What problem does the Context API primarily solve? Form validation Prop Drilling across multiple levels
10 Where should static data be defined in a functional component to avoid re-creation on every render? Inside the useEffect hook Outside the component function
11 What does JSX stand for? JavaScript XML JavaScript XML
12 In a controlled component, where is the form data handled? By the component's state By the component's state
13 What is the main benefit of using 'Interfaces' in TypeScript? Defining the shape/structure of an object Defining the shape/structure of an object
14 What is the purpose of the useParams hook in React Router? To refresh the current page To access dynamic parameters from the URL
15 What is a Higher-Order Component (HOC)? A function that takes a component and returns a new component A function that takes a component and returns a new component
16 Which JavaScript engine powers Node.js? SpiderMonkey V8 Engine
17 What is the primary role of 'Middleware' in Express.js? To render front-end templates only To execute code during the Request/Response cycle
18 Which HTTP method is typically used to update an existing resource in a REST API? PUT / PATCH PUT / PATCH
19 Which Node.js module is used for handling file system operations? http fs
20 How many parts does a JSON Web Token (JWT) consist of? 2 3
21 How do you define a dynamic path parameter in an Express route? /user/:id /user/:id
22 How can you handle asynchronous operations in Node.js? Using Callbacks, Promises, or Async/Await Using Callbacks, Promises, or Async/Await
23 Which middleware is used to parse JSON bodies in Express 4.x+? body.reader() express.json()
24 What is the main purpose of the Node.js Event Loop? To handle CPU-intensive tasks To handle non-blocking I/O operations
25 Why is module.exports used in Node.js? To share functions or objects between files To share functions or objects between files
26 Is Node.js fundamentally single-threaded? Yes Yes
27 How many arguments does an Express global error-handling middleware take? 4 (err, req, res, next) 4 (err, req, res, next)
28 What does CORS stand for? Code Origin Resource System Cross-Origin Resource Sharing
29 What happens when you run npm install --save-dev? It installs a dependency for development only It installs a dependency for development only
30 What is the use of process.env in a Node.js application? To check available RAM To access environment variables
31 What type of database is MongoDB? Relational (SQL) NoSQL (Document-oriented)
32 In MongoDB, what is a single record called? Table Document
33 What is the purpose of a 'Schema' in Mongoose? To encrypt passwords To define the structure of documents in a collection
34 Which operator is used to update a specific field in a MongoDB document? $update $set
35 What is the role of $match in a MongoDB Aggregation Pipeline? To filter documents based on a condition To filter documents based on a condition
36 What is the default port for a MongoDB server? 3306 27017
37 Why is the populate() method used in Mongoose? To encrypt data To replace IDs with actual documents from other collections
38 A 'Collection' in MongoDB is equivalent to what in SQL? Database Table
39 What is the primary benefit of Database Indexing? To increase security To improve query performance speed
40 Is the _id field in a MongoDB document immutable by default? Only for admins Yes
41 What is the output of typeof null in JavaScript? "null" "object"
42 What is a "Closure" in JavaScript? Closing a browser tab A function bundled with its lexical environment
43 What does the Array .map() method return? A new array with transformed elements A new array with transformed elements
44 What is 'Hoisting' in JavaScript? A memory leak Moving declarations to the top of their scope
45 What does Promise.all() reject? When all promises fail As soon as any one promise rejects
46 Which symbol represents the ES6 Spread operator? ::: ...
47 Which symbol represents the ES6 Spread operator? ::: ...
Page 1
Admin Dashboard