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
- Which HTML tag is used to create a hyperlink?
A) <link>
B) <href>
C) <a>
D) <hyperlink>
β Answer: C - What does CSS stand for?
A) Computer Style Sheets
B) Cascading Style Sheets
C) Creative Style Sheets
D) Colorful Style Sheets
β Answer: B - Which property is used to change the background color in CSS?
A) color
B) bgcolor
C) background-color
D) background
β Answer: C - 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
- 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
- Which CSS unit is relative to the font-size of the element?
A) px
B) em
C) %
D) vh
β Answer: B
πΈ JavaScript (Theory + Code)
- What is the output of this code?
console.log(typeof null);
A) “null”
B) “undefined”
C) “object”
D) “number”
β
Answer: C
- 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
Build It All: Frontend to Backend β Enroll in Full Stack Now
- Which keyword is used to declare an async function in JS?
A) async
B) await
C) function*
D) yield
β Answer: A - 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
- 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
- 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
- Which module is used to create a server in Node.js?
A) http
B) url
C) fs
D) net
β Answer: A - Which platform is Express.js built on?
A) React
B) Angular
C) Node.js
D) Vue.js
β Answer: C - 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
- 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
- Which method sends data using POST in Express?
A) res.send()
B) app.post()
C) req.send()
D) app.send()
β Answer: B - Start Express server on port 3000:
const express = require('express');
const app = express();
app.listen(3000);
β Answer: Starts on port 3000
- 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
- Which function reads a file asynchronously in Node.js?
A) readFile()
B) fs.readFile()
C) readFileSync()
D) fileRead()
β Answer: B
ποΈ MongoDB
- Which of the following is a NoSQL database?
A) MySQL
B) PostgreSQL
C) MongoDB
D) SQLite
β Answer: C - What does this query return?
db.users.find({ age: { $gt: 25 } });
A) All users
B) Users > 25
C) Users < 25
D) Error
β
Answer: B
- Which method retrieves a single document?
db.courses.findOne({ name: "Node.js" });
β Answer: Finds one course
- Which format does MongoDB store data in?
A) CSV
B) JSON
C) XML
D) YAML
β Answer: B - Which command inserts data?
db.students.insertOne({ name: "John" });
β Answer: insertOne
- What is the default _id field type in MongoDB?
A) String
B) Number
C) ObjectId
D) Null
β Answer: C - Update one document in MongoDB:
db.users.updateOne({ name: "Ravi" }, { $set: { age: 30 } });
β Answer: C
π SQL
- Which SQL command retrieves data?
A) SELECT
B) FETCH
C) GET
D) SHOW
β Answer: A - Which SQL clause filters results?
A) SORT
B) ORDER BY
C) WHERE
D) LIMIT
β Answer: C - Which SQL keyword defines a primary key?
A) KEY
B) PRIMARY
C) PRIMARY KEY
D) UNIQUE KEY
β Answer: C - Which port does MySQL use by default?
A) 27017
B) 3306
C) 1521
D) 8080
β Answer: B
π Git & Deployment
- Which command initializes a Git repo?
A) git start
B) git create
C) git init
D) git new
β Answer: C - Which file manages dependencies in Node.js?
A) index.js
B) node_modules
C) package.json
D) npm.config
β Answer: C - Which command uploads changes to GitHub?
A) git upload
B) git send
C) git push
D) git deploy
β Answer: C - What does CI/CD stand for?
A) Continuous Integration/Continuous Deployment
B) Code Injection/Code Design
C) Create & Deploy
D) None
β Answer: A - Which tool is used for CI/CD?
A) Netlify
B) Jenkins
C) MongoDB
D) Postman
β Answer: B - Which Git command stages changes?
A) git stage
B) git push
C) git add
D) git track
β Answer: C - Free platform for front-end deployment?
A) Netlify
B) Bluehost
C) Oracle
D) Firebase
β Answer: A - Which file stores env variables?
A) config.html
B) .env
C) data.json
D) keys.js
β Answer: B
π General Concepts
- 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 - What does this JS output?
console.log(typeof []);
β Answer: “object”
- JavaScript framework NOT listed below?
A) Angular
B) React
C) Django
D) Vue.js
β Answer: C - Flexbox is used for:
A) Images
B) Video layout
C) Responsive layout
D) Transitions
β Answer: C - Which keyword defines a variable in ES6?
A) var
B) let
C) const
D) Both B and C
β Answer: D - What does this function output?
console.log(typeof function() {});
β Answer: “function”
- Default display of div is:
A) inline
B) block
C) flex
D) none
β Answer: B - What is the purpose of res.send() in Express?
A) Handles request
B) Sends response
C) Reads file
D) Makes query
β Answer: B - Which of these is NOT a valid HTTP method?
A) GET
B) PUT
C) PUSH
D) POST
β Answer: C - Which function handles routing in Express?
A) router.use
B) app.get
C) useRouter
D) express.route
β Answer: B - 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.