Full Stack Development MCQs Objective Type Quiz & MCQs with Answers for Interview Preparation

Gyansetu Team Web Development/Programming
Full Stack Development

Practice these MCQs to sharpen your Full Stack Development skills and prepare confidently for job interviews or certification exams.

Whether you’re working toward becoming a front-end developer, back-end engineer, or a complete full-stack professional β€” this is the place to start.

50+ Full Stack MCQs covering everything from HTML, CSS, JavaScript, Node.js, Express, MongoDB, SQL, Git, and deployment β€” complete with answers to help you test and reinforce your knowledge, no guesswork needed.

🧩 HTML & CSS

  1. Which HTML tag is used to create a hyperlink?
    A) <link>
    B) <href>
    C) <a>
    D) <hyperlink>
    βœ… Answer: C
  2. What does CSS stand for?
    A) Computer Style Sheets
    B) Cascading Style Sheets
    C) Creative Style Sheets
    D) Colorful Style Sheets
    βœ… Answer: B
  3. Which property is used to change the background color in CSS?
    A) color
    B) bgcolor
    C) background-color
    D) background
    βœ… Answer: C
  4. Which HTML tag correctly embeds a JavaScript file?
html
<script src="app.js"></script>

A) <js src=”app.js”>
B) <script link=”app.js”>
C) <script src=”app.js”>
D) <script file=”app.js”>
βœ… Answer: C

  1. What does this CSS code do?
css
.container {
Β  display: flex;
Β  justify-content: center;
Β  align-items: center;
}

A) Aligns top-left
B) Centers horizontally only
C) Centers both
D) Breaks layout
βœ… Answer: C

  1. Which CSS unit is relative to the font-size of the element?
    A) px
    B) em
    C) %
    D) vh
    βœ… Answer: B

πŸ”Έ JavaScript (Theory + Code)

  1. What is the output of this code?
console.log(typeof null);

A) “null”
B) “undefined”
C) “object”
D) “number”
βœ… Answer: C

  1. What does the following return?

let arr = [1, 2, 3];
console.log(arr.includes(2));

A) 1
B) true
C) false
D) undefined
βœ… Answer: B

.NET MVC course

Build It All: Frontend to Backend – Enroll in Full Stack Now

  1. Which keyword is used to declare an async function in JS?
    A) async
    B) await
    C) function*
    D) yield
    βœ… Answer: A
  2. What will be the output?
function add(a = 2, b = 3) {
Β  return a + b;
}
console.log(add());

A) 2
B) 3
C) 5
D) NaN
βœ… Answer: C

  1. What is the output?

console.log(0 == ‘0’);
console.log(0 === ‘0’);

A) true, true
B) false, false
C) true, false
D) false, true
βœ… Answer: C

  1. Which method converts a string to an integer in JS?
let result = parseInt("42px");

A) Number()
B) toNumber()
C) parseInt()
D) Integer()
βœ… Answer: C


βš™οΈ Node.js & Express

  1. Which module is used to create a server in Node.js?
    A) http
    B) url
    C) fs
    D) net
    βœ… Answer: A
  2. Which platform is Express.js built on?
    A) React
    B) Angular
    C) Node.js
    D) Vue.js
    βœ… Answer: C
  3. What does this Express route log?
app.get('/user/:id', (req, res) => {
Β  console.log(req.params.id);
});

A) Query string
B) Route param
C) Header
D) Cookie
βœ… Answer: B

  1. What does this middleware do?
app.use(express.json());

A) Parses headers
B) Parses form data
C) Parses JSON body
D) Handles routing
βœ… Answer: C

  1. Which method sends data using POST in Express?
    A) res.send()
    B) app.post()
    C) req.send()
    D) app.send()
    βœ… Answer: B
  2. Start Express server on port 3000:
const express = require('express');
const app = express();
app.listen(3000);

βœ… Answer: Starts on port 3000

  1. What is returned here?
const greet = name => `Hello, ${name}`;
console.log(greet("Gyansetu"));

A) Hello
B) Hello Gyansetu
C) “Hello, name”
D) undefined
βœ… Answer: B

  1. Which function reads a file asynchronously in Node.js?
    A) readFile()
    B) fs.readFile()
    C) readFileSync()
    D) fileRead()
    βœ… Answer: B

πŸ—ƒοΈ MongoDB

  1. Which of the following is a NoSQL database?
    A) MySQL
    B) PostgreSQL
    C) MongoDB
    D) SQLite
    βœ… Answer: C
  2. What does this query return?
db.users.find({ age: { $gt: 25 } });

A) All users
B) Users > 25
C) Users < 25
D) Error
βœ… Answer: B

  1. Which method retrieves a single document?
db.courses.findOne({ name: "Node.js" });

βœ… Answer: Finds one course

  1. Which format does MongoDB store data in?
    A) CSV
    B) JSON
    C) XML
    D) YAML
    βœ… Answer: B
  2. Which command inserts data?
db.students.insertOne({ name: "John" });

βœ… Answer: insertOne

  1. What is the default _id field type in MongoDB?
    A) String
    B) Number
    C) ObjectId
    D) Null
    βœ… Answer: C
  2. Update one document in MongoDB:
db.users.updateOne({ name: "Ravi" }, { $set: { age: 30 } });

βœ… Answer: C


πŸ“Š SQL

  1. Which SQL command retrieves data?
    A) SELECT
    B) FETCH
    C) GET
    D) SHOW
    βœ… Answer: A
  2. Which SQL clause filters results?
    A) SORT
    B) ORDER BY
    C) WHERE
    D) LIMIT
    βœ… Answer: C
  3. Which SQL keyword defines a primary key?
    A) KEY
    B) PRIMARY
    C) PRIMARY KEY
    D) UNIQUE KEY
    βœ… Answer: C
  4. Which port does MySQL use by default?
    A) 27017
    B) 3306
    C) 1521
    D) 8080
    βœ… Answer: B

πŸ”„ Git & Deployment

  1. Which command initializes a Git repo?
    A) git start
    B) git create
    C) git init
    D) git new
    βœ… Answer: C
  2. Which file manages dependencies in Node.js?
    A) index.js
    B) node_modules
    C) package.json
    D) npm.config
    βœ… Answer: C
  3. Which command uploads changes to GitHub?
    A) git upload
    B) git send
    C) git push
    D) git deploy
    βœ… Answer: C
  4. What does CI/CD stand for?
    A) Continuous Integration/Continuous Deployment
    B) Code Injection/Code Design
    C) Create & Deploy
    D) None
    βœ… Answer: A
  5. Which tool is used for CI/CD?
    A) Netlify
    B) Jenkins
    C) MongoDB
    D) Postman
    βœ… Answer: B
  6. Which Git command stages changes?
    A) git stage
    B) git push
    C) git add
    D) git track
    βœ… Answer: C
  7. Free platform for front-end deployment?
    A) Netlify
    B) Bluehost
    C) Oracle
    D) Firebase
    βœ… Answer: A
  8. Which file stores env variables?
    A) config.html
    B) .env
    C) data.json
    D) keys.js
    βœ… Answer: B

πŸ”„ General Concepts

  1. CRUD stands for?
    A) Create, Read, Update, Delete
    B) Copy, Read, Upload, Drop
    C) Clone, Run, Update, Drop
    D) Create, Run, Upload, Drop
    βœ… Answer: A
  2. What does this JS output?
console.log(typeof []);

βœ… Answer: “object”

  1. JavaScript framework NOT listed below?
    A) Angular
    B) React
    C) Django
    D) Vue.js
    βœ… Answer: C
  2. Flexbox is used for:
    A) Images
    B) Video layout
    C) Responsive layout
    D) Transitions
    βœ… Answer: C
  3. Which keyword defines a variable in ES6?
    A) var
    B) let
    C) const
    D) Both B and C
    βœ… Answer: D
  4. What does this function output?
console.log(typeof function() {});

βœ… Answer: “function”

  1. Default display of div is:
    A) inline
    B) block
    C) flex
    D) none
    βœ… Answer: B
  2. What is the purpose of res.send() in Express?
    A) Handles request
    B) Sends response
    C) Reads file
    D) Makes query
    βœ… Answer: B
  3. Which of these is NOT a valid HTTP method?
    A) GET
    B) PUT
    C) PUSH
    D) POST
    βœ… Answer: C
  4. Which function handles routing in Express?
    A) router.use
    B) app.get
    C) useRouter
    D) express.route
    βœ… Answer: B
  5. Default port for Express apps:
    A) 80
    B) 3000
    C) 5000
    D) 8080
    βœ… Answer: B

Mastering these Full Stack MCQs is a valuable step toward becoming a well-rounded web developer.
If you’re ready to elevate your career with real-world projects, hands-on coding, and expert-led instruction, join our Full Stack Development course in Gurgaon at Gyansetu and become industry-ready in building modern, scalable web applications from front-end to back-end.

.NET MVC course

Code the Future: Become a Full Stack Developer Today

Gyansetu Team

Leave a Comment

Your email address will not be published. Required fields are marked *

Categories
Drop us a Query
+91-9999201478

Available 24x7 for your queries

Please enable JavaScript in your browser to complete this form.