










































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!











































Question 1.Which of the following best describes a byte? A) The smallest addressable unit of memory, typically 8 bits B) A group of 4 bits used to represent a single hexadecimal digit C) A memory location that can store a floating-point number only D) The physical storage device on a computer Answer: A Explanation: A byte is the basic addressable unit of memory in most computer architectures and consists of 8 bits. Question 2.Which primitive data type would you use to store the value true or false? A) int B) char C) boolean D) double Answer: C Explanation: The boolean type represents logical values: true or false. Question 3.Which of the following is a mutable sequence type in most high-level languages? A) String B) Integer C) Array/List D) Boolean Answer: C Explanation: Arrays or lists can have their elements added, removed, or changed after creation, making them mutable. Question 4.In a flowchart, which symbol represents a decision point? A) Oval B) Rectangle
C) Diamond D) Parallelogram Answer: C Explanation: A diamond shape denotes a branch where a condition is evaluated to decide the flow direction. Question 5.What is the output of the following pseudocode?
i = 0 while i < 3 print i i = i + 1A) 0 1 2 3 B) 1 2 3 C) 0 1 2 D) 3 2 1 Answer: C Explanation: The loop prints i while i is less than 3, resulting in 0, 1, and 2. Question 6.Which statement correctly describes “pass-by-reference” in parameter passing? A) The function receives a copy of the argument’s value. B) The function can modify the original variable passed by the caller. C) The argument must be a primitive type. D) The function receives a read-only version of the argument. Answer: B Explanation: Pass-by-reference gives the function access to the original variable, allowing modifications to affect the caller’s data.
Question 10.In Agile Scrum, what is the name of the meeting held daily to synchronize the team’s work? A) Sprint Review B) Sprint Retrospective C) Daily Stand-up D) Backlog Grooming Answer: C Explanation: The Daily Stand-up (or Daily Scrum) is a short meeting for team members to share progress and impediments. Question 11.What does a “user story” typically describe in Agile development? A) Detailed technical specifications for a module. B) A high-level requirement from the perspective of an end-user. C) The sequence of test cases for a feature. D) The deployment plan for the application. Answer: B Explanation: User stories capture functional requirements in a simple, user-focused format. Question 12.Which Git command creates a new branch called “feature-login”? A) git branch feature-login B) git checkout -b feature-login C) git merge feature-login D) git pull feature-login Answer: B Explanation: “git checkout -b ” creates and switches to a new branch in one step. Question 13.What is a “merge conflict” in version control? A) When two files have identical content.
B) When two branches have changes to the same part of a file that Git cannot automatically reconcile. C) When a repository has no remote. D) When a commit message is empty. Answer: B Explanation: A merge conflict occurs when overlapping edits prevent Git from automatically merging branches. Question 14.Which of the following is an example of input validation? A) Storing user passwords in plain text. B) Checking that an email address contains an “@” symbol before processing. C) Using a hard-coded API key in source code. D) Sending data over an unsecured HTTP connection. Answer: B Explanation: Validating that an email contains “@” ensures the input conforms to expected format before use. Question 15.What type of attack exploits unsanitized user input to inject malicious SQL commands? A) Cross-Site Scripting (XSS) B) SQL Injection C) Man-in-the-Middle (MITM) D) Buffer overflow Answer: B Explanation: SQL injection occurs when attackers manipulate unsanitized inputs to execute arbitrary SQL statements. Question 16.Which cryptographic algorithm is primarily used for symmetric encryption? A) RSA B) AES
D) Abstraction Answer: B Explanation: Method overriding lets a subclass redefine a method inherited from its parent class. Question 20.What is the purpose of an interface in OOP? A) To store data in a database. B) To define a contract of method signatures without implementation. C) To provide a concrete class that cannot be extended. D) To enforce variable naming conventions. Answer: B Explanation: Interfaces specify methods that implementing classes must provide, enabling loose coupling. Question 21.Which of the following best describes a runtime exception? A) An error detected by the compiler before execution. B) An error that occurs while the program is running, often due to invalid operations. C) A syntax mistake in the source code. D) A warning that does not stop program execution. Answer: B Explanation: Runtime exceptions arise during execution, such as null pointer dereferences or array index out-of-bounds. Question 22.In a try-catch-finally block, which part always executes regardless of whether an exception was thrown? A) try B) catch C) finally D) None of the above
Answer: C Explanation: The finally block runs after try/catch, even if an exception is re-thrown or not caught. Question 23.What distinguishes client-side scripting from server-side scripting? A) Client-side code runs on the user’s browser, while server-side code runs on the web server. B) Server-side code cannot access a database. C) Client-side scripting does not use JavaScript. D) Server-side scripting is only used for static pages. Answer: A Explanation: Client-side scripts execute in the browser, whereas server-side scripts run on the server to generate dynamic content. Question 24.Which HTML element is used to embed a JavaScript file into a web page? A) B) C) D) Answer: A Explanation: The `
Question 29.In cloud computing, what does PaaS stand for? A) Platform as a Service B) Private as a Service C) Performance as a Service D) Provisioning as a Service Answer: A Explanation: PaaS provides a platform allowing developers to build, test, and deploy applications without managing underlying infrastructure. Question 30.What technology enables isolation of applications with their own dependencies on a single host? A) Virtual Machine (VM) B) Docker containers C) Load balancer D) CDN Answer: B Explanation: Docker containers package an application with its dependencies, providing lightweight isolation. Question 31.Which of the following is a characteristic of a relational database? A) Data is stored as key-value pairs without a fixed schema. B) Tables are related through primary and foreign keys. C) Queries are performed using MapReduce. D) Data is accessed only through REST APIs. Answer: B Explanation: Relational databases organize data in tables linked by primary/foreign key relationships.
Question 32.What does the term “normalization” aim to achieve in database design? A) Increase redundancy for faster reads. B) Reduce data duplication and improve data integrity. C) Encrypt all columns in a table. D) Convert relational data into JSON format. Answer: B Explanation: Normalization organizes tables to eliminate redundant data and ensure logical dependencies. Question 33.Which normal form eliminates partial dependency of non-key attributes on a composite primary key? A) 1NF B) 2NF C) 3NF D) BCNF Answer: B Explanation: Second Normal Form (2NF) removes partial dependencies where a non-key attribute depends on only part of a composite key. Question 34.What is the purpose of a primary key in a relational table? A) To store large binary objects. B) To uniquely identify each row in the table. C) To define the table’s indexing strategy only. D) To allow duplicate records. Answer: B Explanation: A primary key provides a unique identifier for each record, ensuring entity integrity. Question 35.Which SQL clause is used to filter rows returned by a SELECT statement?
B) Transactions are executed sequentially without interference from other concurrent transactions. C) Data is stored permanently after a crash. D) All operations are performed in a single batch. Answer: B Explanation: Isolation ensures that concurrent transactions do not affect each other’s intermediate states. Question 39.How would you typically specify a connection to a SQL Server database in a .NET application? A) Using a URL like http://server/database B) Providing a connection string containing server name, database name, and credentials. C) Embedding the SQL query inside the source code. D) Using a JSON file with the query results. Answer: B Explanation: A connection string contains necessary details (server, database, authentication) for establishing a DB connection. Question 40.What is a “foreign key” used for in relational databases? A) To encrypt a column’s data. B) To enforce referential integrity between two tables. C) To index a column for faster search. D) To store binary large objects. Answer: B Explanation: A foreign key links a column in one table to the primary key of another, ensuring related records remain consistent. Question 41.In which scenario would a NoSQL database be more appropriate than a relational database? A) When strict ACID transactions are required for financial records.
B) When the data model is highly relational with many joins. C) When the application needs to store flexible, schema-less JSON documents at massive scale. D) When complex SQL queries with aggregations are common. Answer: C Explanation: NoSQL document stores excel at handling flexible, semi-structured data and horizontal scaling. Question 42.What does the SELECT DISTINCT clause accomplish? A) Returns only unique rows, eliminating duplicates. B) Sorts the result set in ascending order. C) Limits the number of rows returned. D) Updates rows with distinct values. Answer: A Explanation: DISTINCT removes duplicate rows from the result set. Question 43.Which HTTP status code indicates that the client must authenticate to gain network access? A) 200 OK B) 301 Moved Permanently C) 401 Unauthorized D) 403 Forbidden Answer: C Explanation: 401 signals that authentication is required and has failed or not been provided. Question 44.What is the main advantage of using a CDN (Content Delivery Network) for static assets? A) It encrypts all data in transit. B) It stores assets in a single central server for easier management.
Explanation: Waterfall follows a linear, phase-by-phase approach where each stage must finish before the next begins. Question 48.What is a “use case” primarily used for? A) Describing how a system interacts with external actors to achieve a goal. B) Defining database schema. C) Specifying low-level algorithmic steps. D) Measuring performance benchmarks. Answer: A Explanation: Use cases capture functional requirements from the perspective of users or other systems. Question 49.Which design principle encourages separating concerns into distinct layers such as presentation, business logic, and data access? A) DRY (Don’t Repeat Yourself) B) SOLID C) MVC (Model-View-Controller) D) KISS (Keep It Simple, Stupid) Answer: C Explanation: MVC divides an application into Model, View, and Controller layers, each handling specific responsibilities. Question 50.What does the “protected” access modifier allow? A) Access only within the declaring class. B) Access from any class in the same package and subclasses. C) Access from any class in the project. D) No access outside the class. Answer: B Explanation: Protected members are visible to classes in the same package (or module) and to subclasses, even if they are in different packages.
Question 51.Which of the following best describes method overloading? A) Defining multiple methods with the same name but different parameter lists within the same class. B) Redefining a method in a subclass with the same signature. C) Using a method name that matches a built-in language keyword. D) Calling a method from multiple threads simultaneously. Answer: A Explanation: Overloading allows a class to have several methods sharing a name but differing in parameter types or counts. Question 52.Which pattern provides a way to create objects without specifying the exact class of object that will be created? A) Singleton B) Factory Method C) Observer D) Decorator Answer: B Explanation: The Factory Method pattern encapsulates object creation, allowing subclasses to decide which concrete class to instantiate. Question 53.What is the primary purpose of unit testing? A) To validate that individual components work correctly in isolation. B Answer: A Explanation: Unit tests focus on small, isolated pieces of code to ensure they behave as expected. Question 54.In which scenario is recursion generally preferred over iteration?
B. They prevent SQL injection by separating code from data. C. They automatically generate database indexes. D. They allow queries to be written in plain English. Answer: B Explanation: Parameterized queries treat user input as data, not executable code, mitigating injection attacks. Question 58.Which of the following is a characteristic of a “microservice” architecture? A. All functionality resides in a single monolithic codebase. B. Services are tightly coupled and share a common database schema. C. Each service is independently deployable and communicates over lightweight protocols. D. The entire application must be written in the same programming language. Answer: C Explanation: Microservices are small, independent services that interact via APIs, enabling independent deployment and scaling. Question 59.In JavaScript, which method creates a deep copy of a plain object? A. Object.assign({}, obj) B. JSON.parse(JSON.stringify(obj)) C. obj.clone() D. obj.copy() Answer: B Explanation: Serializing to JSON and back creates a new object with duplicated values, achieving a deep copy for plain data. Question 60.What does the CSS property display: flex; enable? A. Positioning elements absolutely relative to the viewport. B. Creating a flexible box layout that can align and distribute space among items.
C. Hiding an element from the page. D. Adding a background gradient. Answer: B Explanation: Flexbox provides a one-dimensional layout model for arranging items in rows or columns with flexible sizing. Question 61.Which of the following best describes “debouncing” in front-end development? A. Encrypting data before sending it to the server. B. Limiting the rate at which a function is invoked, ensuring it runs after a pause in events. C. Caching API responses in local storage. D. Compressing images for faster page load. Answer: B Explanation: Debouncing postpones function execution until a specified idle period has elapsed, useful for events like scrolling or typing. Question 62.What is the purpose of the git rebase command? A. To merge two branches and create a merge commit. B. To apply commits from one branch onto another, creating a linear history. C. To delete a branch from the remote repository. D. To stash uncommitted changes. Answer: B Explanation: Rebase re-applies commits onto a new base, producing a cleaner, linear commit history. Question 63.Which of the following is a typical characteristic of a “deadlock” in concurrent programming? A. Two threads simultaneously read the same variable without synchronization. B. Two or more threads each wait for a resource held by the other, causing a standstill.