MCQ
Which of the following is NOT a front-end web development language?
a) HTML
b) CSS
c) JavaScript
d) Python
d
What does REST stand for in the context of web APIs?
a) Representational State Transfer
b) Remote Server Technology
c) Responsive Server Transmission
d) Real-time Server Transfer
a
Which framework is commonly used for building single-page web applications (SPAs)?
a) React
b) Django
c) Node.js
d) Spring Boot
a
Which development methodology emphasizes iterative development and customer feedback?
a) Waterfall
b) Agile
c) Scrum
d) Both b) and c)
d
What is the importance of API documentation in web and mobile app development?
a) To provide information about how to use the API
b) To facilitate communication between developers and users
c) To ensure consistency in API usage
d) All of the above
d
Which technology enables the development of web applications that can run on multiple devices without code rewriting?
a) Progressive Web Apps (PWAs)
b) Native Apps
c) Hybrid Apps
d) None of the above
a
What is the primary benefit of using cloud computing for web and mobile app development?
a) Reduced infrastructure costs
b) Increased scalability
c) Enhanced security
d) All of the above
d
What is the role of Artificial Intelligence (AI) in web and mobile app development?
a) To automate repetitive tasks
b) To personalize user experiences
c) To enhance app functionality
d) All of the above
d
Which of the following is a common technique for optimizing web application performance?
a) Caching
b) Minification
c) Code optimization
d) All of the above
d
Which type of database is commonly used for storing large amounts of unstructured data, such as social media posts or user activity logs?
a) Relational databases
b) NoSQL databases
c) In-memory databases
d) Object-oriented databases
b
Which cloud platform offers a wide range of services, including compute, storage, networking, and databases, typically on a pay-as-you-go basis?
a) Amazon Web Services (AWS)
b) Microsoft Azure
c) Google Cloud Platform (GCP)
d) All of the above
d
Which type of testing is typically performed by the developers themselves to verify the correctness of individual units of code?
a) Integration testing
b) System testing
c) User acceptance testing
d) Unit testing
d
Which tag is used to define the largest heading in HTML?
a) <h6>
b) <h1>
c) <heading>
d) <head>
Answer: b) <h1>
Which attribute is used to provide a unique identifier to an HTML element?
a) class
b) id
c) name
d) key
Answer: b) id
What is the correct syntax to create a hyperlink in HTML?
a) <a href="url">link text</a>
b) <link src="url">link text</link>
c) <a name="url">link text</a>
d) <a>url</a>
Answer: a) <a href="url">link text</a>
Which tag is used to create an unordered list in HTML?
a) <ul>
b) <ol>
c) <li>
d) <list>
Answer: a) <ul>
Which input type is used to create a slider control in HTML5?
a) range
b) slider
c) number
d) scrollbar
Answer: a) range
What is the correct way to specify an image in HTML?
a) <img src="image.jpg" alt="description">
b) <image src="image.jpg" text="description">
c) <img href="image.jpg" alt="description">
d) <image href="image.jpg" text="description">
Answer: a) <img src="image.jpg" alt="description">
Which property is used to change the background color of an element in CSS?
a) color
b) background-color
c) bg-color
d) bgcolor
Answer: b) background-color
What is the correct syntax to make all paragraphs in an HTML document bold using CSS?
a) p {font-weight: bold;}
b) p {text-bold: true;}
c) p {style: bold;}
d) p {weight: bold;}
Answer: a) p {font-weight: bold;}
Which CSS property is used to control the space between elements?
a) spacing
b) padding
c) margin
d) border-spacing
Answer: c) margin
How can a class be applied to an HTML element?
a) Using id="classname"
b) Using class="classname"
c) Using style="classname"
d) Using apply="classname"
Answer: b) Using class="classname"
What is the correct way to include an external CSS file in an HTML document?
a) <style href="styles.css">
b) <link rel="stylesheet" type="text/css" href="styles.css">
c) <css src="styles.css">
d) <style src="styles.css">
Answer: b) <link rel="stylesheet" type="text/css" href="styles.css">
Which CSS property is used to make text italic?
a) font-italic
b) text-style
c) font-style
d) italicize
Answer: c) font-style
Which of the following units is relative to the font-size of the element in CSS?
a) px
b) em
c) cm
d) mm
Answer: b) em
Which keyword is used to declare a variable in JavaScript?
a) var
b) let
c) const
d) All of the above
Answer: d) All of the above
What is the correct syntax for referring to an external script file in HTML?
a) <script href="script.js"></script>
b) <script src="script.js"></script>
c) <script ref="script.js"></script>
d) <script link="script.js"></script>
Answer: b) <script src="script.js"></script>
Which of the following methods is used to select an element by its ID in JavaScript?
a) document.getElementsByClassName()
b) document.querySelector()
c) document.getElementById()
d) document.selectElementById()
Answer: c) document.getElementById()
Which event occurs when a user clicks on an HTML element?
a) onmouseover
b) onchange
c) onclick
d) onhover
Answer: c) onclick
How do you write an “if” statement in JavaScript?
a) if i = 5
b) if (i == 5)
c) if i == 5 then
d) if i = 5 then
Answer: b) if (i == 5)
Which operator is used to check both value and type in JavaScript?
a) ==
b) ===
c) !=
d) =
Answer: b) ===
What is the purpose of the isNaN()
function in JavaScript?
a) To check if a value is a number
b) To check if a value is not a number
c) To convert a string to a number
d) To generate random numbers
Answer: b) To check if a value is not a number
Which method is used to add an element to the end of an array in JavaScript?
a) push()
b) pop()
c) append()
d) add()
Answer: a) push()
How can you create a function in JavaScript?
a) function myFunction {}
b) function myFunction() {}
c) function: myFunction() {}
d) function = myFunction() {}
Answer: b) function myFunction() {}
Which of the following is not a JavaScript data type?
a) Undefined
b) Boolean
c) Float
d) Object
Answer: c) Float
What will typeof null
return in JavaScript?
a) null
b) undefined
c) object
d) string
Answer: c) object
Which built-in method sorts the elements of an array?
a) sort()
b) order()
c) arrange()
d) align()
Answer: a) sort()