1What are the two main parts of a web application, often referred to as client-side and server-side?
Introduction to Web Development
Easy
A.Input and Output
B.Header and Footer
C.Frontend and Backend
D.Software and Hardware
Correct Answer: Frontend and Backend
Explanation:
Web development is broadly divided into frontend (client-side, what the user sees) and backend (server-side, the logic and data management).
Incorrect! Try again.
2Which language is used to define the structure and content of a web page?
Languages such as HTML, CSS, PHP, Java Scripts, and frameworks by using VS code tool
Easy
A.PHP
B.CSS
C.JavaScript
D.HTML
Correct Answer: HTML
Explanation:
HTML (HyperText Markup Language) is the standard markup language for creating web pages and defining their structure.
Incorrect! Try again.
3Which of the following technologies is primarily responsible for the styling and visual presentation of a website?
frontend
Easy
A.HTML
B.SQL
C.Python
D.CSS
Correct Answer: CSS
Explanation:
CSS (Cascading Style Sheets) is a stylesheet language used to describe the presentation of a document written in HTML.
Incorrect! Try again.
4Which of these tasks is typically handled by the backend of a web application?
backend
Easy
A.Displaying images and text in the browser
B.Processing form submissions and interacting with a database
C.Arranging elements on the page
D.Changing the color of a button when a user hovers over it
Correct Answer: Processing form submissions and interacting with a database
Explanation:
The backend (server-side) is responsible for logic, data processing, and database interactions that the user doesn't see directly.
Incorrect! Try again.
5What is the primary function of a database in a web application?
databases
Easy
A.To make the website interactive
B.To handle user requests
C.To store and manage data persistently
D.To define the layout and colors
Correct Answer: To store and manage data persistently
Explanation:
Databases are used to store, retrieve, update, and manage application data, such as user accounts, posts, and product information.
Incorrect! Try again.
6In the acronym CRUD, what does the letter 'R' stand for?
CRUD applications
Easy
A.Redirect
B.Revise
C.Read
D.Remove
Correct Answer: Read
Explanation:
CRUD stands for the four basic functions of persistent storage: Create, Read, Update, and Delete.
Incorrect! Try again.
7What is the main goal of User Interface (UI) design?
User Interface Design
Easy
A.To manage the version control of the project
B.To optimize the database for faster queries
C.To write the server-side code for an application
D.To make the product's interface visually appealing and easy for the user to interact with
Correct Answer: To make the product's interface visually appealing and easy for the user to interact with
Explanation:
UI design focuses on the visual aspects and interactive elements of a digital product to ensure it is attractive and simple to use.
Incorrect! Try again.
8What is the core principle of responsive web design?
Responsive web design
Easy
A.The website has a separate version for mobile and desktop
B.The website uses a lot of animations
C.The website layout adapts to different screen sizes and devices
D.The website responds to user clicks within 1 second
Correct Answer: The website layout adapts to different screen sizes and devices
Explanation:
Responsive web design aims to provide an optimal viewing and interaction experience across a wide range of devices, from mobile phones to desktop computers.
Incorrect! Try again.
9The 'mobile-first' development strategy involves:
mobile-first development
Easy
A.Prioritizing the mobile app over the website
B.Designing for desktop computers first, then simplifying for mobile
C.Only building applications that work on mobile phones
D.Designing for mobile devices first, then adding features for larger screens
Correct Answer: Designing for mobile devices first, then adding features for larger screens
Explanation:
Mobile-first is a design and development strategy that starts with the smallest screen as a baseline and progressively enhances the design for larger screens.
Incorrect! Try again.
10What is a major characteristic of a Single Page Application (SPA)?
Single page applications (SPA)
Easy
A.It cannot connect to a database
B.It consists of only one simple page with no links
C.It dynamically rewrites the current page rather than loading new pages from the server
D.It can only be written in a single programming language
Correct Answer: It dynamically rewrites the current page rather than loading new pages from the server
Explanation:
SPAs provide a more fluid, app-like user experience by loading a single HTML page and updating its content dynamically using JavaScript.
Incorrect! Try again.
11Which language is essential for adding interactivity, such as form validation or animations, to a website?
Languages such as HTML, CSS, PHP, Java Scripts, and frameworks by using VS code tool
Easy
A.CSS
B.JavaScript
C.HTML
D.SQL
Correct Answer: JavaScript
Explanation:
JavaScript is a scripting language that runs in the user's browser to make web pages interactive and dynamic.
Incorrect! Try again.
12A professional who works on both the frontend and backend parts of a web application is called a:
Job-roles and skillset for full stack and UI/UX
Easy
A.UI Designer
B.Database Administrator
C.Full Stack Developer
D.Project Manager
Correct Answer: Full Stack Developer
Explanation:
A Full Stack Developer has a broad skillset and is capable of handling all aspects of web development, from the user interface to the server and database.
Incorrect! Try again.
13What does 'AR' stand for in the context of technology?
Overview of AR/VR-significance
Easy
A.Augmented Reality
B.Advanced Rendering
C.Artificial Reality
D.Automated Response
Correct Answer: Augmented Reality
Explanation:
AR stands for Augmented Reality, which is a technology that overlays computer-generated images on a user's view of the real world.
Incorrect! Try again.
14Which technology completely replaces a user's real-world environment with a simulated one?
How does AR/VR work?
Easy
A.Machine Learning
B.Virtual Reality (VR)
C.Augmented Reality (AR)
D.Responsive Design
Correct Answer: Virtual Reality (VR)
Explanation:
Virtual Reality (VR) immerses the user in a completely artificial digital environment, blocking out the real world.
Incorrect! Try again.
15Which piece of hardware is most commonly associated with experiencing Virtual Reality (VR)?
Software/Hardware and devices
Easy
A.Keyboard
B.Headset
C.Mouse
D.Webcam
Correct Answer: Headset
Explanation:
VR headsets are worn over the eyes to provide the visual and auditory experience of the virtual world, creating a sense of immersion.
Incorrect! Try again.
16Which of the following is a common application of Augmented Reality (AR)?
Applications
Easy
A.Typing a document in a word processor
B.Fully immersive 3D movies
C.Sending an email
D.Mobile games that overlay characters onto the real world (e.g., Pokémon GO)
Correct Answer: Mobile games that overlay characters onto the real world (e.g., Pokémon GO)
Explanation:
AR technology enhances the real world with digital information, making it ideal for interactive games, navigation apps, and virtual furniture placement.
Incorrect! Try again.
17Which job role is primarily concerned with how a product feels and the user's overall experience with it?
Job-roles and skillset for full stack and UI/UX
Easy
A.Backend Developer
B.UX Designer
C.Systems Analyst
D.Database Administrator
Correct Answer: UX Designer
Explanation:
A User Experience (UX) Designer focuses on the entire journey a user takes with a product, ensuring it is logical, efficient, and enjoyable.
Incorrect! Try again.
18PHP is a popular language for backend development. What does 'PHP' stand for?
backend
Easy
A.Programming Homepage Protocol
B.PHP: Hypertext Preprocessor
C.Personal Home Page
D.Primary Host Program
Correct Answer: PHP: Hypertext Preprocessor
Explanation:
PHP is a recursive acronym that stands for 'PHP: Hypertext Preprocessor'. It is a widely-used open source general-purpose scripting language.
Incorrect! Try again.
19What is Visual Studio Code (VS Code)?
Languages such as HTML, CSS, PHP, Java Scripts, and frameworks by using VS code tool
Easy
A.A version control system
B.A popular source-code editor
C.A database management system
D.A web browser
Correct Answer: A popular source-code editor
Explanation:
Visual Studio Code is a free, lightweight, and powerful source-code editor developed by Microsoft that is widely used for web development.
Incorrect! Try again.
20In web development, what is the 'client'?
frontend
Easy
A.The database
B.The programmer
C.The web server
D.The user's web browser
Correct Answer: The user's web browser
Explanation:
The 'client' refers to the user's computer or web browser that requests and displays web pages from a server. Frontend code (HTML, CSS, JS) runs on the client.
Incorrect! Try again.
21A developer is building a responsive layout. They use the CSS rule @media (min-width: 768px) { .sidebar { display: block; } } after defining .sidebar { display: none; } in their base styles. What is the practical effect of this approach?
Responsive web design
Medium
A.The sidebar is always visible, but its width changes at 768px.
B.The sidebar is visible only on screens smaller than 768px.
C.The sidebar is hidden by default and becomes visible only on screens that are 768px wide or wider.
D.This code will cause an error because it's a conflicting rule.
Correct Answer: The sidebar is hidden by default and becomes visible only on screens that are 768px wide or wider.
Explanation:
This is an example of a mobile-first approach. The base style (display: none;) applies to all screen sizes, starting with mobile. The media query then overrides this style for screens with a minimum width of 768px, making the sidebar appear on tablets and desktops.
Incorrect! Try again.
22In a full stack application, a user submits a registration form with a username and password. Which of the following describes a secure, standard procedure for the backend to handle the password?
backend
Medium
A.Store the password in a database column in plain text for easy retrieval.
B.Encrypt the password with a key and store the encrypted version. The key is stored in the same database.
C.Hash the password with a salt using an algorithm like bcrypt, and store only the resulting hash.
D.Email the plain text password to the system administrator for manual verification and storage.
Correct Answer: Hash the password with a salt using an algorithm like bcrypt, and store only the resulting hash.
Explanation:
Storing passwords in plain text or with simple reversible encryption is highly insecure. The industry standard is to use a strong, one-way hashing algorithm with a unique salt for each user. This makes it computationally infeasible to reverse the hash back to the original password, even if the database is compromised.
Incorrect! Try again.
23A user edits their profile information on a social media site and clicks 'Save'. In a RESTful API context, which HTTP method and corresponding CRUD operation are most appropriate for this action?
CRUD applications
Medium
A.HTTP PUT or PATCH and UPDATE
B.HTTP POST and CREATE
C.HTTP GET and READ
D.HTTP DELETE and DELETE
Correct Answer: HTTP PUT or PATCH and UPDATE
Explanation:
The 'U' in CRUD stands for Update. In a RESTful API, the PUT or PATCH methods are used to update an existing resource. PUT typically replaces the entire resource, while PATCH applies a partial modification. Both correspond to the UPDATE database operation.
Incorrect! Try again.
24What is a primary drawback of a Single Page Application (SPA) compared to a traditional Multi-Page Application (MPA) that developers must often address?
Single page applications (SPA)
Medium
A.Initial page load time can be longer, and Search Engine Optimization (SEO) requires special handling (like server-side rendering).
B.It is impossible to use modern JavaScript frameworks like React or Vue with SPAs.
C.SPAs generally provide a slower, less fluid user experience after the initial load.
D.SPAs are incapable of communicating with a backend server or database.
Correct Answer: Initial page load time can be longer, and Search Engine Optimization (SEO) requires special handling (like server-side rendering).
Explanation:
SPAs load a large JavaScript bundle upfront. This can lead to a longer initial load time. Also, because content is rendered client-side, search engine crawlers may not see the final content, making SEO more challenging without techniques like Server-Side Rendering (SSR) or Static Site Generation (SSG).
Incorrect! Try again.
25A developer wants to center a <div> element horizontally within its parent container. Which of the following CSS Flexbox properties should be applied to the parent container to achieve this?
Languages such as HTML, CSS, PHP, Java Scripts, and frameworks by using VS code tool
Medium
A.margin: 0 auto;
B.align-items: center;
C.text-align: center;
D.justify-content: center;
Correct Answer: justify-content: center;
Explanation:
In a Flexbox layout (display: flex;), the justify-content property aligns items along the main axis (which is horizontal by default). Setting it to center will center the flex items horizontally. align-items centers items on the cross-axis (vertical), text-align is for inline content, and margin: 0 auto; works on block elements but is not a flexbox property.
Incorrect! Try again.
26A UX designer is creating a mobile app for a diverse audience, including users with visual impairments. Which of the following design choices best adheres to accessibility principles?
User Interface Design
Medium
A.Choosing a very small font size to fit more information on the screen.
B.Using light grey text on a white background for a minimalist aesthetic.
C.Relying solely on color (e.g., red for errors, green for success) to convey important information.
D.Ensuring a high contrast ratio between text and background, and using labels or icons in addition to color.
Correct Answer: Ensuring a high contrast ratio between text and background, and using labels or icons in addition to color.
Explanation:
Accessibility guidelines (like WCAG) emphasize the need for high color contrast for readability. Furthermore, information should never be conveyed by color alone, as color-blind users may not be able to perceive it. Combining color with text labels or icons ensures the message is accessible to everyone.
Incorrect! Try again.
27A company is hiring a UI/UX Designer. Which of the following task descriptions would be most representative of this role?
Job-roles and skillset for full stack and UI/UX
Medium
A.Implementing the frontend logic and state management using the React framework and JavaScript.
B.Writing efficient database queries in SQL and managing the server infrastructure.
C.Creating user personas, wireframes, and interactive prototypes using tools like Figma or Sketch.
D.Developing and maintaining REST APIs using Node.js and Express.
Correct Answer: Creating user personas, wireframes, and interactive prototypes using tools like Figma or Sketch.
Explanation:
A UI/UX Designer focuses on the user's experience and the application's look and feel. Their core tasks involve research (personas, user flows), planning the layout (wireframes), and creating visual, often interactive, mockups (prototypes). The other options describe backend, and frontend development roles.
Incorrect! Try again.
28In an Augmented Reality (AR) application like Pokémon GO, what core technology allows the application to place a virtual character in the real-world scene viewed through a phone's camera?
How does AR/VR work?
Medium
A.GPS, for determining the user's location on a map.
B.SLAM (Simultaneous Localization and Mapping), which tracks the device's position and understands the geometry of the physical environment.
C.Haptic feedback, which makes the phone vibrate.
D.A high-refresh-rate display to reduce motion sickness.
Correct Answer: SLAM (Simultaneous Localization and Mapping), which tracks the device's position and understands the geometry of the physical environment.
Explanation:
While GPS is used to find where Pokémon appear on the map, the technology that actually 'anchors' the virtual object to a real-world surface (like the sidewalk) is SLAM. It allows the device to build a map of its surroundings and track its own position within that map, making the augmentation appear stable and realistic.
Incorrect! Try again.
29A developer is using JavaScript to fetch data from a remote API. The fetch call returns a Promise. What is the purpose of using .then() or await with this Promise?
frontend
Medium
A.To define the code that should be executed asynchronously after the network request successfully completes.
B.To immediately stop the execution of all other code until the data arrives.
C.To specify the URL of the API endpoint.
D.To convert the fetched data into a CSS stylesheet.
Correct Answer: To define the code that should be executed asynchronously after the network request successfully completes.
Explanation:
Network requests are asynchronous, meaning the code doesn't wait for them to finish. A Promise is an object representing the eventual completion (or failure) of an asynchronous operation. The .then() method or the await keyword provides a way to handle the successful response once it is received from the server, without blocking the rest of the application.
Incorrect! Try again.
30When implementing a mobile-first responsive design, a developer writes CSS for small screens first, then uses min-width media queries for larger screens. What is a key performance benefit of this approach?
mobile-first development
Medium
A.This approach guarantees a perfect score on all web performance audits.
B.Mobile devices, which may be on slower networks, download only the essential CSS without being burdened by complex styles for larger screens.
C.Desktop browsers do not need to parse the mobile styles, making the site faster on desktop.
D.It forces developers to write less CSS overall, reducing file size.
Correct Answer: Mobile devices, which may be on slower networks, download only the essential CSS without being burdened by complex styles for larger screens.
Explanation:
In a mobile-first approach, the base CSS is simple and targeted at small screens. Styles for larger screens are wrapped in media queries. A mobile browser will download and parse all the CSS, but it only has to apply the simpler base styles. This progressive enhancement ensures a faster rendering experience for the most constrained devices.
Incorrect! Try again.
31A developer needs to design a database for a social network where users can have many friends, and this relationship is mutual (if A is friends with B, B is friends with A). What is the most appropriate way to model this many-to-many relationship in a relational (SQL) database?
databases
Medium
A.Store the entire friends list as a JSON object within each user's row in the users table.
B.Create three tables: users, friendships (a join table), and profiles. The friendships table would have columns like user_one_id and user_two_id.
C.Create two tables: users and friends. The friends table has columns user_id and friend_id.
D.Create a single users table with a 'friends' column that stores a comma-separated list of friend IDs.
Correct Answer: Create three tables: users, friendships (a join table), and profiles. The friendships table would have columns like user_one_id and user_two_id.
Explanation:
A many-to-many relationship in a relational database is correctly modeled using a third table, often called a join or junction table (in this case, friendships). This table contains foreign keys that reference the primary keys of the two tables it connects (users in this case). This avoids data duplication and allows for efficient querying.
Incorrect! Try again.
32What is the primary role of the Document Object Model (DOM) in how a web browser renders a webpage?
Introduction to Web Development
Medium
A.It is a tree-like data representation of the HTML document that the browser creates, which can then be manipulated by languages like JavaScript.
B.It is a programming language that handles user interactions and API calls.
C.It is a styling language used to apply colors and layouts to web content.
D.It is a server-side representation of the database schema.
Correct Answer: It is a tree-like data representation of the HTML document that the browser creates, which can then be manipulated by languages like JavaScript.
Explanation:
The browser parses the HTML file and creates the DOM, which is an in-memory, object-based representation of the document's structure. CSS is used for styling, and JavaScript is used to interact with and dynamically modify this DOM to create interactive web pages.
Incorrect! Try again.
33What is the key difference between a standalone VR headset (like the Meta Quest) and a PC-tethered VR headset (like the Valve Index)?
Software/Hardware and devices
Medium
A.PC-tethered headsets are used for Augmented Reality, while standalone headsets are only for Virtual Reality.
B.Standalone headsets have all the necessary processing hardware built-in, while PC-tethered headsets rely on the processing power of a connected computer.
C.Only PC-tethered headsets have built-in speakers.
D.Standalone headsets cannot track user movement, while PC-tethered headsets can.
Correct Answer: Standalone headsets have all the necessary processing hardware built-in, while PC-tethered headsets rely on the processing power of a connected computer.
Explanation:
The main distinction is the source of computation. A standalone headset is an all-in-one device with its own processor, GPU, and storage. A PC-tethered headset offloads all rendering and processing to a powerful external PC, which allows for higher-fidelity graphics but restricts movement due to the physical cable.
Incorrect! Try again.
34In which of the following scenarios would applying Virtual Reality (VR) technology offer a more significant advantage than Augmented Reality (AR)?
Overview of AR/VR-significance
Medium
A.A surgeon needing to see a patient's real-time vitals displayed in their field of view during an operation.
B.A tourist wanting to see historical information overlaid on ancient ruins while visiting them.
C.A pilot learning to handle emergency landing situations in a fully simulated, risk-free cockpit environment.
D.A technician repairing an engine who needs to see a digital manual projected onto the machine.
Correct Answer: A pilot learning to handle emergency landing situations in a fully simulated, risk-free cockpit environment.
Explanation:
VR's strength lies in creating complete immersion in a purely digital environment, replacing the user's real-world surroundings. This is ideal for simulations and training where the real-world context is not needed or is dangerous. The other scenarios describe enhancing the real world with digital information, which is the primary use case for AR.
Incorrect! Try again.
35Consider the following JavaScript code: const x = '10'; const y = 20; console.log(x + y);. What is the output and why?
Languages such as HTML, CSS, PHP, Java Scripts, and frameworks by using VS code tool
Medium
A.A TypeError, because you cannot add a string and a number.
B.200, because the + operator performs multiplication in this context.
C.'1020', because the + operator performs string concatenation when one of the operands is a string.
D.30, because JavaScript automatically converts the string '10' to a number for addition.
Correct Answer: '1020', because the + operator performs string concatenation when one of the operands is a string.
Explanation:
This demonstrates JavaScript's type coercion. When the + operator is used and one of the operands is a string, JavaScript converts the other operand (the number 20) to a string ('20') and concatenates them, resulting in the string '1020'.
Incorrect! Try again.
36What is the primary purpose of creating a wireframe during the UI/UX design process?
User Interface Design
Medium
A.To conduct final user acceptance testing with a fully functional product.
B.To write the backend code and define the database schema.
C.To establish the final color scheme, typography, and branding of the application.
D.To serve as a low-fidelity, structural blueprint that focuses on the layout, hierarchy of information, and functionality of a page.
Correct Answer: To serve as a low-fidelity, structural blueprint that focuses on the layout, hierarchy of information, and functionality of a page.
Explanation:
Wireframing is an early step in the design process. It deliberately omits visual details like colors and fonts to focus solely on the 'bones' of the interface. This allows designers and stakeholders to agree on the structure and user flow before investing time in high-fidelity visual design and development.
Incorrect! Try again.
37A web application allows users to post comments. When a user deletes one of their own comments, what is the expected backend response to the frontend client after a successful operation?
CRUD applications
Medium
A.A 200 OK or 204 No Content status code, confirming the deletion.
B.The full list of all remaining comments for the post.
C.A 404 Not Found status code, because the resource no longer exists.
D.A 301 Moved Permanently redirect to the homepage.
Correct Answer: A 200 OK or 204 No Content status code, confirming the deletion.
Explanation:
After a successful DELETE request, the server should respond with a success status code. 200 OK is acceptable if a confirmation message is returned in the body. 204 No Content is often preferred as it indicates success but signifies that there is no response body to return, which is efficient for a deletion action.
Incorrect! Try again.
38What is the role of a web framework like Express.js (for Node.js) or Laravel (for PHP) in backend development?
backend
Medium
A.To provide a structured set of tools and libraries for handling common tasks like routing, request handling, and database interaction.
B.To design the user interface and create visual assets for the website.
C.To manage the deployment of the application to a cloud server.
D.To automatically write all the HTML, CSS, and JavaScript for the frontend.
Correct Answer: To provide a structured set of tools and libraries for handling common tasks like routing, request handling, and database interaction.
Explanation:
Backend frameworks provide an abstraction layer over the raw programming language. They handle boilerplate code for tasks like parsing incoming HTTP requests, routing them to the correct controller functions, and simplifying database operations, allowing developers to focus on the application's specific business logic.
Incorrect! Try again.
39In the context of a Single Page Application framework like React, what is meant by 'component-based architecture'?
Single page applications (SPA)
Medium
A.The entire application is built as a single, monolithic file.
B.Every page of the website is a separate physical component that must be purchased.
C.The user interface is broken down into small, independent, and reusable pieces (components), each with its own logic and presentation.
D.The application's backend and frontend are hosted on the same physical hardware component.
Correct Answer: The user interface is broken down into small, independent, and reusable pieces (components), each with its own logic and presentation.
Explanation:
Component-based architecture is a core principle of modern frontend frameworks. It involves building complex UIs by composing simple, self-contained components (like a button, a search bar, or a user profile card). This approach promotes reusability, easier maintenance, and better organization of the codebase.
Incorrect! Try again.
40A developer wants to ensure that a JavaScript function initMap() only runs after the entire HTML page, including all images and stylesheets, has been fully loaded and parsed. Which browser event should they listen for?
frontend
Medium
A.load
B.click
C.DOMContentLoaded
D.scroll
Correct Answer: load
Explanation:
The DOMContentLoaded event fires once the initial HTML document has been completely loaded and parsed, without waiting for stylesheets, images, and subframes to finish loading. The load event, however, fires only after the whole page and all of its dependent resources (like images and CSS) have completely loaded. For a function that might depend on the dimensions of an image, load is the appropriate choice.
Incorrect! Try again.
41A developer is building a large-scale SPA and is concerned about the initial page load time and Search Engine Optimization (SEO). Which architectural pattern would be most effective in mitigating both of these issues while preserving the fluid user experience of an SPA?
Single page applications (SPA)
Hard
A.Client-Side Rendering (CSR) with aggressive code-splitting.
B.Server-Side Rendering (SSR) with hydration.
C.Static Site Generation (SSG) for all pages.
D.Using Web Workers to offload JavaScript execution from the main thread.
Correct Answer: Server-Side Rendering (SSR) with hydration.
Explanation:
SSR sends a fully rendered HTML page from the server, which is great for fast initial load (First Contentful Paint) and SEO crawlers. Hydration then attaches the JavaScript event listeners on the client-side, turning the static page into a fully interactive SPA. CSR with code-splitting helps with load time but doesn't solve the core SEO issue as well as SSR. SSG is excellent for SEO/speed but is unsuitable for highly dynamic content. Web Workers improve runtime performance but don't affect initial load or SEO.
Incorrect! Try again.
42In a CSS Grid layout, a container is defined with display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px;. On a 550px wide screen, a developer expects two columns but sees only one. What is the most likely reason for this behavior?
Responsive web design
Hard
A.The browser calculates the minimum space required for two columns plus the gap (250px + 20px + 250px = 520px), which fits. However, auto-fit collapses empty tracks, and the condition for creating a second track is not fully met under all interpretations of the layout algorithm.
B.The auto-fit keyword is not correctly calculating the available space.
C.The fr unit cannot be used within minmax() when auto-fit is present.
D.The calculation for track placement must account for the gap within the minimum required space. The total minimum space required is actually for two columns (2 * 250px) plus one gap (20px), which is 520px. Since 520px fits within 550px, two columns should appear, but the minmax function is causing a conflict.
Correct Answer: The calculation for track placement must account for the gap within the minimum required space. The total minimum space required is actually for two columns (2 * 250px) plus one gap (20px), which is 520px. Since 520px fits within 550px, two columns should appear, but the minmax function is causing a conflict.
Explanation:
The grid algorithm evaluates if the container can fit at least one more item of the minimum size. The available space is 550px. The minimum size for the first item is 250px. Remaining space: 550 - 250 = 300px. The space needed for the next item and its preceding gap is 20px + 250px = 270px. Since 300px >= 270px, a second column is created. The premise of the question describes an unexpected behavior, but the most plausible misunderstanding leading to this diagnostic question is how the total space is calculated. However, the most technically accurate analysis points to the interplay of auto-fit and minmax. The correct logic is: can another 250px track fit? Yes. Total min space is 250px + 20px + 250px = 520px, which is less than 550px. The error is likely due to a subtle interaction, perhaps with box-sizing on the items if they have padding, which would push the total required width over 550px, causing only one column to be rendered. Option D is the most analytical breakdown, though the provided scenario points to a bug or a missing piece of information like box-sizing.
Incorrect! Try again.
43A web application experiences a high volume of read operations but infrequent writes. The backend uses a primary database and several read replicas. After a user updates their profile, a subsequent request to view the profile, routed to a read replica, returns the old data due to replication lag. Which strategy provides the strongest consistency guarantee to solve this specific problem for the user who just performed the update?
Databases
Hard
A.Using a 'read-your-writes' consistency model by pinning the user's session to the primary database for a short duration after a write.
B.Decreasing the transaction isolation level on the primary database to 'READ UNCOMMITTED'.
C.Switching the entire architecture to a NoSQL database with an eventual consistency model.
D.Implementing a write-through caching layer like Redis for all read operations.
Correct Answer: Using a 'read-your-writes' consistency model by pinning the user's session to the primary database for a short duration after a write.
Explanation:
'Read-your-writes' is a consistency model designed specifically for this scenario. It ensures that once a user has written data, any subsequent reads from that same user are guaranteed to see that write. Pinning their session to the primary DB is a common implementation. Caching can still serve stale data, eventual consistency accepts the problem rather than solving it, and changing isolation levels is irrelevant to replication lag.
Incorrect! Try again.
44To maintain a stable 90 FPS in a VR application and prevent motion sickness, developers must minimize latency. A key component of this is reducing the time between tracking the user's head position and displaying the updated image (motion-to-photon latency). Which technique directly addresses this by re-projecting a rendered frame to match the very latest head-tracking data just before it's sent to the display?
Asynchronous Timewarp (ATW) is a critical technique in VR rendering. It operates independently of the main rendering loop. If a new frame isn't ready in time, ATW takes the last rendered frame, and based on the most recent head-tracking data, it warps or shifts the image to match the user's new orientation. This dramatically reduces perceived latency, even if the application drops frames. Foveated rendering and SPS optimize rendering performance, but ATW specifically targets motion-to-photon latency.
Incorrect! Try again.
45Consider the following JavaScript code snippet. What will be the final output logged to the console, and why?
Languages such as HTML, CSS, PHP, Java Scripts, and frameworks by using VS code tool
Hard
A.A, D, C, B - Synchronous code runs first (A, D). Then the Microtask Queue (Promise's .then) is emptied (C), and only after that is the Macrotask Queue (setTimeout) processed (B).
B.A, C, D, B - The promise resolves immediately after 'A', followed by synchronous code and then the timeout.
C.A, B, C, D - The code executes sequentially as the timeout is non-blocking with a 0ms delay.
D.A, D, B, C - The timeout callback is executed before the promise because its delay is 0ms.
Correct Answer: A, D, C, B - Synchronous code runs first (A, D). Then the Microtask Queue (Promise's .then) is emptied (C), and only after that is the Macrotask Queue (setTimeout) processed (B).
Explanation:
This question tests a deep understanding of the JavaScript Event Loop. The execution order is: 1. All synchronous code in the call stack (console.log('A'), console.log('D')). 2. All tasks in the Microtask Queue (callbacks from Promise.then/catch/finally). 3. One task from the Macrotask (or Callback) Queue (setTimeout, setInterval callbacks). setTimeout(..., 0) doesn't execute immediately but places its callback in the Macrotask Queue. Promise.resolve().then() places its callback in the Microtask Queue. The Microtask Queue always has priority and is fully cleared before the next Macrotask is processed.
Incorrect! Try again.
46A company is hiring for a 'Senior UI/UX Designer' to lead a product redesign. Four candidates are being considered. Which candidate demonstrates the most mature and impactful approach to UI/UX, indicating a senior-level skillset?
Job-roles and skillset for full stack and UI/UX
Hard
A.Candidate C: Demonstrates exceptional proficiency in front-end coding (HTML/CSS/JS), being able to build their own pixel-perfect interactive prototypes without developer assistance.
B.Candidate A: Presents a portfolio of visually stunning, high-fidelity mockups created in Figma, with a focus on modern design trends and complex animations.
C.Candidate D: Specializes in creating and maintaining comprehensive design systems and component libraries to ensure brand consistency across all company products.
D.Candidate B: Presents case studies detailing a process of user research, persona creation, wireframing, A/B testing of prototypes, and quantitative analysis of how their design changes improved key business metrics (e.g., conversion rate, user retention).
Correct Answer: Candidate B: Presents case studies detailing a process of user research, persona creation, wireframing, A/B testing of prototypes, and quantitative analysis of how their design changes improved key business metrics (e.g., conversion rate, user retention).
Explanation:
While all other candidates have valuable skills, Candidate B demonstrates a holistic, data-driven, and business-oriented approach which is the hallmark of a senior UI/UX professional. Senior-level work is not just about creating beautiful interfaces (A), coding them (C), or systematizing them (D), but about a repeatable, evidence-based process that demonstrably solves user problems and achieves business goals. This synthesis of research, design, testing, and business impact is the most critical skillset.
Incorrect! Try again.
47When implementing a 'DELETE' operation in a RESTful CRUD application for a resource with many dependent relationships (e.g., deleting a User who has many Posts), which implementation strategy is most robust for maintaining data integrity?
CRUD applications
Hard
A.Return a 409 Conflict error if a user has any dependent posts, forcing the client to delete the posts first.
B.Implement a 'soft delete' by adding an is_deleted or deleted_at flag to the User table and filtering queries application-wide to exclude soft-deleted users.
C.In the application logic, first delete all dependent Posts in a loop, and only then delete the User record.
D.Use a database-level ON DELETE CASCADE constraint on the foreign keys of all dependent tables (like Posts).
Correct Answer: Implement a 'soft delete' by adding an is_deleted or deleted_at flag to the User table and filtering queries application-wide to exclude soft-deleted users.
Explanation:
Soft delete is generally the most robust and safest strategy for complex systems. It preserves data integrity and history, prevents accidental permanent data loss, and avoids the performance issues and potential for deadlocks that can arise from cascading deletes in a high-concurrency environment. ON DELETE CASCADE is powerful but can lead to unintentional mass deletions. Deleting in application logic is prone to errors if new dependencies are added and the logic isn't updated. Forcing the client to handle it (Option D) creates a poor user experience and complex client-side logic.
Incorrect! Try again.
48A developer is using the mobile-first approach. They have written the base CSS for mobile viewports. Now, they need to add styles for tablets and larger screens. Which media query structure is semantically correct and most efficient for this approach?
The mobile-first methodology involves writing default CSS for the smallest screens and then using min-width media queries to add or override styles as the viewport width increases. This approach avoids having to undo mobile styles on larger screens, leading to cleaner and more efficient CSS. Using max-width is characteristic of the desktop-first (graceful degradation) approach. The other options are either syntactically incorrect or not suitable for defining standard breakpoints.
Incorrect! Try again.
49In a Node.js backend using Express.js, a developer needs to implement middleware that performs an asynchronous operation (e.g., checking user permissions against a database) before passing control to the next handler. If the async operation fails, the request should be terminated with an error. Which code snippet correctly implements this?
This is the most robust implementation. It correctly uses async/await within a try/catch block. Critically, when an error occurs during the async operation, it calls next(err). This passes the error to Express's dedicated error-handling middleware, which is the standard and most maintainable pattern. Option A doesn't handle failures. Option B works but mixes .then/.catch with middleware logic and doesn't use the standard error-handling next(err). Option D will crash the server because throwing an error in non-async middleware is not caught by Express's error handlers.
Incorrect! Try again.
50A developer is optimizing a React application and notices that a component is re-rendering unnecessarily, causing performance issues. The component receives an object as a prop from its parent. Even when the data within the object is identical, the component re-renders every time the parent re-renders. What is the most precise explanation and effective solution for this problem?
Frontend
Hard
A.The parent component is creating a new object literal (prop={{ key: 'value' }}) in its render method. This creates a new object reference on every render, causing the child's prop comparison to fail. The solution is to memoize the object prop using the useMemo hook in the parent.
B.The state management is flawed. The data should be passed via the Context API instead of props to prevent re-renders.
C.JavaScript's == operator is used for comparison, which fails for objects. The solution is to use a deep comparison library like Lodash.
D.The component is not using React.PureComponent which performs a shallow comparison of props.
Correct Answer: The parent component is creating a new object literal (prop={{ key: 'value' }}) in its render method. This creates a new object reference on every render, causing the child's prop comparison to fail. The solution is to memoize the object prop using the useMemo hook in the parent.
Explanation:
This is a classic performance issue in React. When a parent re-renders, it re-evaluates its render function. If an object is defined inline as a prop (<Child data={{...}} />), a new object with a new memory address is created each time. Even if React.memo or PureComponent is used on the child, its shallow prop comparison will see a different object reference and trigger a re-render. The useMemo hook in the parent component ensures that the same object reference is returned as long as its dependencies haven't changed, thus preventing the unnecessary re-render of the child.
Incorrect! Try again.
51According to Fitts's Law, the time to acquire a target is a function of the distance to and size of the target. Mathematically, , where is time, is distance, and is width. How can a UI designer apply this law to optimize the usability of an application's primary call-to-action (CTA) button on a large desktop monitor?
User Interface Design
Hard
A.Increase the button's size () and place it in a predictable location (like the top-right or bottom-right corner) to minimize the cognitive load of finding it ().
B.Use a small, fixed-size CTA button that follows the user's cursor around the screen.
C.Place the CTA button in the center of the screen to minimize the average distance from any point on the screen.
D.Make the CTA button infinitely large by placing it at the edge of the screen, as the edge has a 'magical' effective width.
Correct Answer: Increase the button's size () and place it in a predictable location (like the top-right or bottom-right corner) to minimize the cognitive load of finding it ().
Explanation:
Fitts's Law implies that to decrease the time () to hit a target, you should decrease the distance () or increase the target's width (). Placing the CTA at the screen edge (like the corners or top/bottom edges) makes the effective width () infinitely large in one dimension, because the user cannot 'overshoot' it. This makes it extremely fast to acquire. Increasing the button's size and placing it in a conventional corner are direct applications of the law. While placing it in the center minimizes average distance, corners are often faster to hit due to the 'infinite edge' effect. A following button would be highly distracting.
Incorrect! Try again.
52An Augmented Reality application on a modern smartphone needs to detect a flat surface like a table and place a virtual object on it. This process relies on tracking visual feature points in the camera feed and analyzing how they move as the user moves the phone. What is the underlying computer vision technology that enables this functionality?
Software/Hardware and devices
Hard
A.Photogrammetry
B.Object Recognition using a Convolutional Neural Network (CNN)
C.Simultaneous Localization and Mapping (SLAM)
D.Global Positioning System (GPS) with inertial measurement units (IMU)
Correct Answer: Simultaneous Localization and Mapping (SLAM)
Explanation:
SLAM is the core technology that allows a device to build a map of an unknown environment while simultaneously keeping track of its own location within that map. For AR, the phone's camera and motion sensors (IMU) work together. The SLAM algorithm identifies stable feature points (like corners on a floor pattern), tracks their movement between frames to understand the phone's motion (ego-motion), and builds a 3D point cloud of the environment. From this point cloud, it can infer geometric planes, such as floors and tabletops, enabling the stable placement of virtual objects.
Incorrect! Try again.
53A developer needs to create a highly specific CSS selector that targets an <a> tag only if it is the second<a> tag within its direct parent, and that parent is a <p> tag which itself is an immediate child of a <div> with the class .container. Which selector correctly and most efficiently implements this?
Languages such as HTML, CSS, PHP, Java Scripts, and frameworks by using VS code tool
Hard
A..container > p > a:nth-of-type(2)
B..container p a:nth-child(2)
C..container > p a:nth-of-type(2)
D..container p:first-child a:nth-child(2)
Correct Answer: .container > p a:nth-of-type(2)
Explanation:
Let's break down the correct selector: .container > p correctly selects a <p> tag that is an immediate child of .container. The space after p (p a) is a descendant selector, selecting any <a> tag inside that <p>. Finally, :nth-of-type(2) selects the second element of its type (the second <a>) within its parent (<p>). Option B is incorrect because :nth-child(2) would fail if the second child of <p> was not an <a> tag (e.g., <p><span>text</span><a>link</a></p>). Option C is too strict; p > a would require <a> to be an immediate child, which might not be the case (e.g., <p><b><a>link</a></b></p>). Option A is the most robust choice that meets all requirements.
Incorrect! Try again.
54When a user types https://example.com into their browser and presses Enter, a series of steps occur. Which of these steps involves the client's browser recursively querying a root server, a TLD server, and an authoritative name server to resolve the domain name to an IP address?
Introduction to Web Development
Hard
A.The TCP three-way handshake
B.The TLS/SSL handshake
C.The HTTP GET request
D.The DNS lookup process
Correct Answer: The DNS lookup process
Explanation:
This describes the Domain Name System (DNS) resolution process. The browser (or the OS on its behalf) acts as a DNS client. If the IP address is not cached locally, it will contact a recursive resolver (often provided by the ISP). This resolver then performs the queries: first to a root server to find the .com Top-Level Domain (TLD) server, then to the TLD server to find the authoritative name server for example.com, and finally querying that authoritative server to get the actual IP address. The other options happen after the IP address is known.
Incorrect! Try again.
55A developer is implementing user authentication for a Single Page Application (SPA) using a RESTful backend. Which authentication method provides the best security against Cross-Site Request Forgery (CSRF) attacks by default, without requiring additional tokens or complex header configurations?
Backend
Hard
A.Using Basic Authentication with base64 encoded credentials in every request.
B.Storing a session ID in localStorage and sending it as a custom request header.
C.Storing a JWT in localStorage and sending it in the Authorization: Bearer header.
D.Storing a session ID in a server-set HttpOnly, Secure, SameSite=Strict cookie.
Correct Answer: Storing a session ID in a server-set HttpOnly, Secure, SameSite=Strict cookie.
Explanation:
The combination of cookie attributes provides robust, built-in browser security. HttpOnly prevents JavaScript from accessing the cookie, mitigating XSS attacks. Secure ensures the cookie is only sent over HTTPS. SameSite=Strict is the key for CSRF protection; it prevents the browser from sending the cookie with any cross-site requests, which is the very definition of a CSRF attack. JWT in localStorage is vulnerable to XSS and requires manual attachment to headers. Basic Auth is insecure. Session ID in localStorage is also vulnerable to XSS.
Incorrect! Try again.
56The concept of the 'metaverse' is often discussed as a significant future application of AR/VR. From a technical and user experience perspective, what is the most profound difference between a VR-based metaverse and an AR-based metaverse?
Overview of AR/VR-significance
Hard
A.A VR metaverse is a completely synthetic, computer-generated world that replaces the user's real-world view, whereas an AR metaverse overlays digital information and objects onto the real world.
B.A VR metaverse is primarily for gaming, while an AR metaverse is for professional applications like manufacturing and healthcare.
C.A VR metaverse uses inside-out tracking, while an AR metaverse uses outside-in tracking.
D.A VR metaverse requires more powerful hardware than an AR metaverse.
Correct Answer: A VR metaverse is a completely synthetic, computer-generated world that replaces the user's real-world view, whereas an AR metaverse overlays digital information and objects onto the real world.
Explanation:
This is the fundamental distinction. Virtual Reality (VR) immerses the user in a fully artificial digital environment, occluding the real world. Augmented Reality (AR) enhances or 'augments' the user's view of their actual physical surroundings with computer-generated information. Therefore, a VR metaverse involves creating entire virtual worlds, while an AR metaverse (or 'magicverse') would involve creating a persistent digital layer over our physical world. The other options are generalizations that are not universally true; both can require powerful hardware, have diverse applications, and use various tracking methods.
Incorrect! Try again.
57A full stack developer is designing a schema for a social media application where users can 'like' posts. A post can have millions of likes. Which database design pattern is most scalable for storing and counting these likes?
Databases
Hard
A.A separate likes table as in option C, but also adding a denormalized likes_count column to the posts table that is updated using a database trigger or application logic.
B.A likes column in the posts table storing a JSON array of user_ids who liked the post.
C.A separate likes table with columns (like_id, user_id, post_id), with foreign key constraints and indexes on user_id and post_id.
D.A likes column in the posts table with a counter that is incremented with each like.
Correct Answer: A separate likes table as in option C, but also adding a denormalized likes_count column to the posts table that is updated using a database trigger or application logic.
Explanation:
This approach, known as denormalization with a counter cache, offers the best of both worlds for scalability. The separate likes table (Option C) is fully normalized and essential for tracking who liked what. However, calculating the like count for a post with millions of likes via COUNT(*) on this table for every view is extremely inefficient. By adding a denormalized likes_count column to the posts table, read operations (the most common operation) become trivial and fast. The count is kept in sync via a trigger or application logic upon insert/delete in the likes table. This balances write overhead with massive read performance gains.
Incorrect! Try again.
58What is the primary purpose of the 'virtual DOM' in modern JavaScript frameworks like React, and how does its 'diffing' algorithm contribute to performance?
Frontend
Hard
A.It allows developers to write their UI using HTML-like syntax (JSX) which is then transpiled to a more efficient, lower-level representation.
B.It is a browser-native feature that allows for more direct manipulation of DOM elements than standard JavaScript APIs.
C.It creates a complete, in-memory representation of the UI. When state changes, a new representation is created, and a 'diffing' algorithm compares it with the previous one to calculate the minimal set of actual DOM manipulations needed, reducing costly browser reflows and repaints.
D.It is a security sandbox that isolates framework code from the actual DOM, preventing Cross-Site Scripting (XSS) vulnerabilities.
Correct Answer: It creates a complete, in-memory representation of the UI. When state changes, a new representation is created, and a 'diffing' algorithm compares it with the previous one to calculate the minimal set of actual DOM manipulations needed, reducing costly browser reflows and repaints.
Explanation:
The core performance benefit of the virtual DOM comes from minimizing direct manipulation of the actual browser DOM, which is a slow and expensive operation. By creating a lightweight copy in memory (a JavaScript object), frameworks can compute changes very quickly. The 'diffing' (reconciliation) algorithm efficiently finds the differences between the old and new virtual DOMs. The framework then batches these changes and applies only the necessary updates to the real DOM, avoiding unnecessary rendering work and improving the application's performance and responsiveness.
Incorrect! Try again.
59A startup is building a complex B2B platform. They have hired a Full Stack Developer and a UI/UX Designer. To ensure a smooth and effective workflow, what is the most critical point of collaboration and shared understanding required between these two roles?
Job-roles and skillset for full stack and UI/UX
Hard
A.The Full Stack Developer should decide on the database schema, and the UI/UX Designer must design the interface to fit that data model.
B.The UI/UX Designer focuses on user research and wireframes, while the Full Stack Developer focuses exclusively on backend logic and database performance.
C.Both roles must collaborate on defining the application's state management and API contract. The designer's understanding of user flows informs the API needs, and the developer's understanding of the backend constraints informs the feasibility of the UI.
D.The UI/UX Designer should create high-fidelity, pixel-perfect mockups, and the Full Stack Developer must implement them exactly as specified.
Correct Answer: Both roles must collaborate on defining the application's state management and API contract. The designer's understanding of user flows informs the API needs, and the developer's understanding of the backend constraints informs the feasibility of the UI.
Explanation:
This represents the most mature and collaborative workflow. The user interface is the visual representation of the application's state. The API is the contract that defines how that state is fetched and manipulated. When the designer understands what data is available, what states are possible (loading, error, empty, ideal), and the developer understands the user's journey and what data is needed at each step, they can co-create an efficient, robust, and user-friendly product. This collaboration prevents scenarios where the design is impossible to build or the backend doesn't support the required user experience.
Incorrect! Try again.
60In the context of industrial applications, what is a key advantage of using Augmented Reality (AR) for complex assembly and maintenance tasks over traditional paper manuals or screen-based instructions?
Applications
Hard
A.AR provides 'in-situ' contextual information, overlaying instructions, diagrams, and warnings directly onto the physical equipment, which reduces cognitive load and context-switching for the technician.
B.AR completely eliminates the need for human technicians, allowing for full automation.
C.AR guarantees a 100% reduction in assembly errors.
D.AR hardware is significantly cheaper and more durable than ruggedized tablets or laptops.
Correct Answer: AR provides 'in-situ' contextual information, overlaying instructions, diagrams, and warnings directly onto the physical equipment, which reduces cognitive load and context-switching for the technician.
Explanation:
The primary advantage of AR in this context is its ability to deliver information at the point of need, directly within the user's field of view. A technician doesn't have to constantly look away from the equipment to consult a manual or a separate screen (context-switching). This reduces the mental effort (cognitive load) required to map 2D instructions to a 3D object, leading to faster completion times, lower error rates, and improved safety. The other options are incorrect: AR assists technicians, not replaces them; it reduces but cannot guarantee elimination of errors; and industrial AR hardware is often expensive.