Home / Ravina / MCQs
You will find all MCQs which are added by Ravina
Q. What is GitHub primarily used for?
Q. Which Swift structure is best suited for modeling immutable data?
Q. Which function creates a random integer within a range?
Q. Which keyword is used to mark a class available only for subclassing within the module?
Q. What will this code output?
Q. Which Swift keyword is used to inherit from another class?
Q. Which keyword is used to define an initializer?
Q. Which of these types is a reference type?
Q. Which method is used to convert an array into a string?
Q. Which of the following is NOT a collection type in Swift?
Q. What is the output of `print(type(of: [1, 2, 3]))`?
Q. What will `print("\u{1F600}")` output?
Q. What is `Codable` in Swift?
Q. Which operator is used to define nil-coalescing behavior?
Q. How is a range from 1 to 5 (inclusive) written in Swift?
Q. Which keyword is used to create a protocol extension?
Q. What does the `Set` type ensure in Swift?
Q. What is the type of a Swift closure that takes no parameters and returns nothing?
Q. Which type of loop is guaranteed to run at least once?
Q. Which method is used to remove all elements from an array?
Q. What does the `as?` operator do in Swift?
Q. Which type is used to represent a dynamically sized string slice?
Q. What is the default starting index for a for loop over a vector?
Q. Which keyword is used to return a value early from a function?
Q. Which crate is commonly used for command-line argument parsing?
Q. Which function is used to execute a block of code after a thread finishes?
Q. Which of the following is used for formatted writing to a buffer?
Q. What is the result of 4 % 2 in Rust?
Q. Which method removes all elements from a Vec?
Q. What does std::mem::replace do?
Q. Which of the following types are considered scalar types in Rust?
Q. Which method appends one vector to another?
Q. What happens if a variable is moved and then used again?
Q. Which crate provides serialization and deserialization in Rust?
Q. Which smart pointer automatically deallocates memory when out of scope?
Q. Which method returns an iterator that skips the first n elements?
Q. Which trait should be implemented to allow a custom struct to be compared using < and >?
Q. Which operator is used for logical AND in Rust?
Q. Which method allows you to iterate over a vector and modify its elements?
Q. What is the default behavior of panic! in Rust?
Q. Which macro is used to concatenate strings at compile time?
Q. Which tool is used to build and run tests in Rust?
Q. Which syntax is correct for a function returning a Result?
Q. Which trait allows custom cleanup logic for a type?
Q. Which method removes the last element of a vector?
Q. Which type must be used to allow mutation through shared references?
Q. What is a feature of trait objects?
Q. Which keyword allows you to access fields from a parent struct?
Q. Which trait is used for cloning data?
Q. Which operator is used for dereferencing a reference?
Q. Which method is used to resize a vector?
Q. Which macro is used to format strings without printing?
Q. Which type is used for file handling errors in Rust?
Q. Which method consumes a String and returns a vector of words?
Q. Which keyword is used to match multiple patterns?
Q. What is the main benefit of zero-cost abstractions in Rust?
Q. Which trait must be implemented to allow a type to be formatted using {:?}?
Q. Which type is used to represent a slice of data?
Q. Which macro is used to include the contents of a file as a string?
Q. Which trait is required to use the `==` operator?
Q. What is the purpose of the `dyn` keyword in Rust?
Q. Which address is used to identify a device uniquely on a LAN?
Q. Which protocol is used to assign MAC addresses dynamically?
Q. Which OSI layer ensures complete data transfer?
Q. Which of the following uses UDP?
Q. Which of the following is a protocol for secure communication over HTTP?
Q. Which protocol enables a host to obtain an IP address dynamically?
Q. Which of these is not a valid IPv6 address format?
Q. What is the range of Class C IP addresses?
Q. Which protocol is used by email clients to retrieve messages from the server?
Q. Which of the following allows you to connect to a private network over the internet?
Q. Which of the following is used to virtualize network functions?
Q. Which layer of the OSI model is responsible for logical addressing?
Q. Which of these is a valid subnet mask?
Q. Which IP address class provides up to 65,534 hosts per network?
Q. Which command is used to check network routes in Linux?
Q. What is the maximum number of hosts in a /24 network?
Q. Which port does SSH use by default?
Q. Which of the following addresses is automatically assigned when a device cannot contact a DHCP server?
Q. Which protocol can be used to manage and monitor network devices?
Q. What is the full form of SSL?
Q. Which of the following uses TCP port 443?
Q. Which tool would you use to check DNS propagation?
Q. Which device filters traffic based on IP addresses?
Q. Which layer is responsible for flow control and segmentation?
Q. Which protocol helps detect unreachable hosts and routing loops?
Q. What is a MAC address?
Q. Which of the following is an open standard for directory services?
Q. What is a VLAN used for?
Q. Which device works at both the data link and physical layers?
Q. What does the term 'duplex' refer to in networking?
Q. Which of these is a loopback address in IPv6?
Q. What is the primary use of port 53?
Q. Which command is used to release and renew a DHCP lease in Windows?
Q. Which OSI layer is responsible for end-to-end error recovery?
Q. Which protocol is used to discover the MAC address of a device on a local network?
Q. Which device connects different types of networks?
Q. Which of the following protocols is used for file sharing in Windows networks?
Q. What is the main purpose of a proxy server?
Q. Which protocol provides guaranteed delivery of data?
Q. Which layer of the OSI model handles packet routing?
Q. Which of the following protocols supports remote desktop access?
Q. Which device operates at the physical layer of the OSI model?
Q. Which of the following is used for network troubleshooting and packet capture?
Q. Which tool helps identify the path taken by a packet to its destination?
Q. Which of the following provides the fastest data transmission?
Q. What does a switch use to forward data frames?
Q. Which command is used to test DNS resolution in Windows?
Q. Which networking device regenerates and amplifies signals?
Q. Which protocol allows email retrieval from a mail server?
Q. What is the function of a firewall in networking?
Q. Which organization is responsible for IP address allocation?
Q. Which command is used in Linux to display the network interfaces?
Q. Which of the following protocols is used for secure web browsing?
Q. Which IP class is reserved for multicasting?
Q. Which of the following is used to prevent loops in a switched network?
Q. Which layer of the OSI model is responsible for data encryption?
Q. Which of the following uses packet switching?
Q. What does the acronym LAN stand for?
Q. Which protocol allows access to a remote computer securely over a network?
Q. Which type of cable is used for long-distance high-speed transmission?
Q. What does the TTL field in an IP packet signify?
Q. Which device operates at Layer 3 of the OSI model?
Q. Which tool is used to test end-to-end connectivity?
Q. Which of the following is a Layer 4 protocol?
Q. Which protocol does ping use?
Q. Which IPv6 address type is equivalent to a broadcast in IPv4?
Q. Which wireless standard operates at 5 GHz frequency?
Q. Which layer of the OSI model handles physical addressing?
Q. Which command is used to display ARP table entries?
Q. What is the function of a bridge in networking?
Q. Which OSI layer is responsible for establishing, managing, and terminating sessions?
Q. Which type of DNS record maps a domain to an IP address?
Q. Which protocol is used for sending email?
Q. Which of the following is responsible for assigning domain names?
Q. Which of these is NOT a valid IPv4 address?
Q. Which address type refers to a single unique sender and receiver?
Q. Which type of address allows communication with the nearest device among a group?
Q. Which command shows all active connections and listening ports?
Q. Which IP class provides the highest number of host addresses?
Q. Which of the following commands traces the route taken by packets?
Q. Which of these is a valid private IP address?
Q. Which layer of the OSI model handles encryption and compression?
Q. Which type of cable is most immune to electromagnetic interference?
Q. Which of the following protocols does not guarantee delivery?
Q. Which protocol is used to resolve hostnames to IP addresses?
Q. What does ARP do in a network?
Q. Which topology uses a central device to connect all nodes?
Q. Which address is used for loopback testing?
Q. Which command is used to view the IP configuration in Windows?
Q. Which of the following addresses is used to send packets to all devices in a network segment?
Q. Which protocol uses port 22?
Q. What is jitter in networking?
Q. Which of the following is a private IP range?
Q. Which protocol handles routing in the internet backbone?
Q. Which MAC address is considered a broadcast address?
Q. What does DNS do?
Q. Which IPv4 class has a default mask of 255.0.0.0?
Q. Which tool can capture packets on a network?
Q. Which protocol is connectionless?
Q. Which device routes traffic between different IP networks?
Q. What is the purpose of a subnet mask?
Q. Which address format is used by IPv6?
Q. Which technology uses light pulses to transmit data?
Q. What is the default port number for SMTP?
Q. Which device separates collision domains but not broadcast domains?
Q. Which command displays the IP routing table?
Q. Which layer of the OSI model provides end‑to‑end delivery of data?
Q. Which type of address is used for one-to-many communication?
Q. Which protocol is used to synchronize clocks over a network?
Q. Which port number is associated with DNS queries?
Q. What is the function of the ARP protocol?
Q. Which of these tools can resolve a hostname to an IP address?
Q. Which protocol is used for secure remote login?
Q. Which term describes the delay between sending and receiving data?
Q. What is a characteristic of a mesh topology?
Q. Which of the following is NOT a routing protocol?
Q. What is the purpose of the subnet mask?
Q. Which layer of the OSI model is responsible for flow control?
Q. Which network device can segment collision domains?
Q. Which IP address range is reserved for APIPA?
Q. Which addressing method delivers packets to a group of hosts?
Q. What is the function of a repeater in a network?
Q. What is the primary purpose of NAT in a router?
Q. Which protocol is used to monitor and manage network devices?
Q. Which layer in the OSI model is responsible for error detection and correction?
Q. Which protocol provides automatic IP configuration to hosts?
Q. Which device connects different network architectures, such as Ethernet and Token Ring?
Q. What is the purpose of a firewall?
Q. Which network model distributes workload equally among devices?
Q. Which address is reserved for local broadcast?
Q. Which of these protocols supports remote access via command line?
Q. Which protocol is used to translate private IPs to public IPs?
Q. Which of these addresses is a multicast address?
Q. Which OSI layer is responsible for reliable end-to-end communication?
Q. Which of these is used to assign IP addresses dynamically?
Q. Which port number is used by the POP3 protocol?
Q. Which of these IP classes provides the largest number of host addresses?
Q. Which protocol helps prevent loops in Ethernet networks?
Q. Which protocol allows management of devices on IP networks?
Q. Which of the following is a valid MAC address format?
Q. What is the function of TTL in an IP packet?
Q. Which of the following tools can capture and analyze network traffic?
Q. Which of the following is a Layer 7 protocol?
Q. Which wireless encryption standard is the most secure?
Q. Which of these protocols is used for secure file transfer?
Q. What is the purpose of a default gateway in a network?
Q. Which of the following is NOT a Swift data type?
Q. What is true about closures in Swift?
Q. What is the purpose of the `lazy` keyword in Swift?
Q. Which of these is used to define a protocol in Swift?
Q. Which of the following represents a computed property in Swift?
Q. Which Swift keyword is used to inherit from a superclass?
Q. What is the default value of an optional variable in Swift?
Q. Which of the following is a correct way to define an enum in Swift?
Q. What is the output of the code below?
Q. How do you create a range from 1 to 5 in Swift?
Q. Which operator is used to concatenate strings in Swift?
Q. Which of the following is true about Swift 'struct'?
Q. What will this Swift code output?
Q. How do you create a multiline string in Swift?
Q. What is the type of a tuple declared as `let point = (2, 3)`?
Q. What will the following Swift code print?
Q. How do you define a dictionary in Swift?
Q. Which of the following is a valid way to declare an array in Swift?
Q. What is the purpose of the `guard` statement in Swift?
Q. What will be the output of this code?
Q. Which keyword is used to declare a structure in Swift?
Q. Which type is used to represent decimal values in Swift?
Q. What will this code print?
Q. Which Swift keyword is used to handle errors?
Q. Which keyword is used for declaring a class in Swift?
Q. What is the output of the following code?
Q. What does this Swift code print?
Q. Which Swift statement is used to exit a loop early?
Q. Which operator is used for optional chaining in Swift?
Q. What is the result of this code?
Q. Which collection type in Swift does not allow duplicate values?
Q. How do you unwrap an optional safely in Swift?
Q. What is the purpose of optionals in Swift?
Q. Which keyword is used to define a function in Swift?
Q. What does the following Swift code print?
Q. Which keyword is used to declare a constant in Swift?
Q. Which tool can you use to analyze memory usage in Android?
Q. What is the file extension for an Android package file?
Q. Which Android layout arranges its children into rows and columns?
Q. What is the file format of Android resource files?
Q. Which method is used to set a click listener on a Button?
Q. What is the purpose of AndroidX?
Q. Which Android component allows apps to share data with other apps?
Q. Which Android class is used to schedule background tasks even if the app is closed?
Q. Which folder is used to store app images in Android?
Q. What does the Android Emulator emulate?
Q. Which annotation helps avoid memory leaks with lifecycle-aware components?
Q. Which method is used to destroy a Fragment?
Q. What is the use of the 'res/values/styles.xml' file?
Q. Which Android component interacts with users directly?
Q. What is the default launch mode for an Activity?
Q. What does 'match_parent' do in a layout?
Q. Which drawable folder is best for high-density screens?
Q. Which view is used to display a single child view with specific alignment?
Q. Which method is used to create an options menu in Android?
Q. Which permission is required to access the internet in Android?
Q. What is Jetpack Compose in Android?
Q. What is the minimum SDK version used to specify the lowest supported Android version?
Q. Which Gradle file is used for app-level configurations?
Q. What is the purpose of Android's ViewBinding?
Q. What is the main use of NavController in Jetpack Navigation?
Q. Which class is used for logging messages in Android?
Q. Which tool is used to create Android Virtual Devices (AVDs)?
Q. What is the default file name for string resources?
Q. What is the use of the 'intent' in Android?
Q. Which thread is responsible for UI operations in Android?
Q. Which Android component is lifecycle-aware and survives configuration changes?
Q. Which permission is required to access the camera?
Q. Which layout is most flexible and allows complex constraint-based positioning?
Q. What is the purpose of 'onSaveInstanceState()' method?
Q. What does 'Parcelable' interface do in Android?
Q. Which Android architecture component is responsible for data persistence?
Q. Which view is best suited for displaying large data sets efficiently?
Q. What does the keyword 'this' refer to in an Android Activity?
Q. Which method is called when an activity comes to the foreground?
Q. What is ANR in Android?
Q. What is the use of Handler in Android?
Q. What is the main entry point of an Android application?
Q. Which file type is used for vector graphics in Android?
Q. Which Android component provides data to UI components and survives configuration changes?
Q. Which tool is used to profile CPU and memory usage in Android apps?
Q. Which method is used to register a BroadcastReceiver programmatically?
Q. What does MVVM stand for in Android architecture?
Q. Which permission is required to read contacts in Android?
Q. Which Android component listens for and reacts to system-wide events?
Q. What is the use of AndroidManifest.xml?
Q. Which Android component allows communication between different apps?
Q. Which class is used to load images efficiently in Android apps?
Q. What is the Android Activity lifecycle method called after onCreate()?
Q. Which attribute sets the orientation of a LinearLayout?
Q. What does Gradle do in Android development?
Q. What is the recommended language for Android development as of 2020?
Q. Which class is used for asynchronous task handling in Android?
Q. What is Context in Android?
Q. Which Android library provides backward-compatible versions of Android components?
Q. Which file is automatically generated and contains IDs for all resources?
Q. Which method is used to stop a Service in Android?
Q. What is the use of ANR watchdog in Android?
Q. What does the 'intent-filter' tag in the manifest define?
Q. Which Jetpack library helps manage UI-related data in a lifecycle-conscious way?
Q. What is the use of LiveData in Android?
Q. Which Android feature lets you store structured data and share it with other apps?
Q. Which method in Activity is called when the screen orientation changes?
Q. Which Android component handles interactions with the SQLite database?
Q. Which annotation is used to indicate that a method is called on the UI thread?
Q. Which Android component is used to perform long-running tasks in the background?
Q. What is the use of ProGuard in Android?
Q. Which view should you use to embed a webpage in your Android app?
Q. Which tool is used to inspect the layout hierarchy of your app?
Q. Which Android version introduced Material Design?
Q. Which method is used to show a Toast in Android?
Q. What does the 'dp' unit in Android stand for?
Q. What is the function of SharedPreferences in Android?
Q. Which class in Android is used to create and display notifications?
Q. Which layout allows you to position elements relative to each other?
Q. Which Android UI element is best suited for auto-complete suggestions?
Q. What type of software is antivirus software?
Q. Which of the following is a portable storage device?
Q. What is the use of a UPS?
Q. Which component stores the operating system and other system files?
Q. Which device is used to connect different networks?
Q. Which component provides the graphical interface to users?
Q. What does 'bit' stand for?
Q. Which of the following is an Internet Protocol?
Q. Which language is used to control the appearance of web pages?
Q. What is the purpose of the Recycle Bin in Windows?
Q. Which device is used to project images on a screen?
Q. Which of these is used to read barcodes?
Q. Which part of the computer is responsible for storing data long-term?
Q. Which function key is used to open help in many programs?
Q. Which of these is not a feature of an operating system?
Q. Which software is used to create drawings?
Q. Which key is used to permanently delete a file in Windows?
Q. Which of the following is an optical storage device?
Q. Which of these storage types is fastest?
Q. What does HTTP stand for?
Q. What is the purpose of a device driver?
Q. Which of these stores data even when the power is off?
Q. What type of file is created using MS Word?
Q. Which key is used to rename a file or folder?
Q. Which of these is not part of MS Office?
Q. Which of the following is used to write computer programs?
Q. Which technology is used in wireless LAN?
Q. Which of these is used to compress files?
Q. Which of these is not a web domain?
Q. Which command is used to save a file?
Q. Which of the following stores the BIOS settings?
Q. What does the term 'booting' refer to?
Q. What is the main function of a firewall?
Q. Which one of these is an output device?
Q. Which of the following languages is used for web development?
Q. Which of these is a common audio file extension?
Q. What is the binary number system based on?
Q. Which of these is NOT an input device?
Q. Which of the following is a spreadsheet software?
Q. What is the shortcut to select all text in a document?
Q. What is a hyperlink?
Q. Which key is used to move the cursor to the beginning of a line?
Q. Which component supplies power to the computer?
Q. Which of these is a permanent memory?
Q. What does the refresh button in a browser do?
Q. Which device is used to take a hard copy of a document?
Q. Which of the following is NOT an application software?
Q. Which shortcut is used to paste copied content?
Q. Which of these is not a function of an operating system?
Q. What is phishing?
Q. Which of the following is NOT a type of computer port?
Q. What is the main function of the motherboard?
Q. What does PDF stand for?
Q. What is the function of Ctrl + Z?
Q. Which software is used to surf the internet?
Q. Which of the following allows multiple users to access a computer system?
Q. Which of the following is NOT a valid operating system?
Q. Which Indian Prime Minister abolished the Privy Purse?
Q. Which Article gives the Parliament power to form new states?
Q. Which Article provides for the impeachment of the President?
Q. What is the maximum number of judges (excluding the Chief Justice) in the Supreme Court of India as per the Constitution?
Q. Which state in India has the largest Vidhan Sabha (Legislative Assembly)?
Q. How many schedules are there in the Indian Constitution (as of 2024)?
Q. Who was the Chairman of the Drafting Committee of the Indian Constitution?
Q. Which Indian body is referred to as the 'temple of democracy'?
Q. Which Fundamental Right prohibits human trafficking and forced labour?
Q. Which is the highest law officer in India?
Q. The Parliament of India consists of how many components?
Q. Which committee is known for recommending the Panchayati Raj system?
Q. Which state was the first to implement the Panchayati Raj system?
Q. Which Article of the Constitution gives the right to minorities to establish and administer educational institutions?
Q. Which Indian Prime Minister served the longest continuous term?
Q. Which amendment reduced the voting age from 21 years to 18 years in India?
Q. How many languages are listed in the 8th Schedule of the Indian Constitution (as of 2024)?
Q. Which of the following is NOT a type of emergency mentioned in the Indian Constitution?
Q. The first Constitutional Amendment was passed in which year?
Q. Which fundamental right is available only to Indian citizens and not to foreigners?
Q. Which state in India has a separate Constitution (before 2019)?
Q. Who among the following can attend both Rajya Sabha and Lok Sabha sessions but cannot vote?
Q. What is the maximum term of a member of the Legislative Assembly?
Q. Which of these is NOT a feature of a federal government?
Q. Who presides over the sessions of the Lok Sabha?
Q. The 42nd Amendment is known as the:
Q. Which is the longest written Constitution in the world?
Q. Which part of the Constitution deals with citizenship?
Q. The concept of Fundamental Rights in India is borrowed from which country?
Q. Which authority can remove the Vice-President of India?
Q. Which Article provides for the Uniform Civil Code?
Q. What is the total number of Fundamental Duties in the Indian Constitution?
Q. The Right to Education is included in which Article of the Constitution?
Q. How many members are nominated by the President to the Lok Sabha?
Q. Which Article of the Indian Constitution guarantees freedom of speech and expression?
Q. What does the term 'Secular' in the Preamble mean?
Q. Which body is known as the 'watchdog of democracy' in India?
Q. Which schedule of the Indian Constitution contains the list of official languages?
Q. Which fundamental right protects the cultural rights of minorities in India?
Q. Which of the following writs literally means 'you may have the body'?
Q. Which of the following is a part of the Union Executive?
Q. What is the term of office of the Chief Election Commissioner?
Q. Which Article empowers the Supreme Court to issue writs?
Q. Which constitutional body advises the President on financial matters?
Q. What does the Tenth Schedule of the Indian Constitution deal with?
Q. Which Article deals with the abolition of titles in India?
Q. Which constitutional amendment lowered the voting age from 21 to 18?
Q. The President of India is elected by:
Q. Which House of Parliament cannot be dissolved?
Q. Which of the following is NOT a constitutional body?
Q. Which Article of the Indian Constitution gives special status to Jammu and Kashmir (before 2019)?
Q. Who is known as the constitutional head of India?
Q. Which institution in India is responsible for conducting elections to the Parliament and State Legislatures?
Q. The slogan 'Satyameva Jayate' is taken from which ancient text?
Q. In which year was the Right to Information (RTI) Act passed?
Q. Which is the highest and final judicial authority in India?
Q. Which state has the largest number of seats in the Lok Sabha?
Q. Which political party was founded by Subhas Chandra Bose?
Q. Which Article provides for the amendment of the Indian Constitution?
Q. Which constitutional amendment gave constitutional status to Panchayati Raj institutions?
Q. Which House of Parliament is more powerful in money matters?
Q. What is the minimum age for becoming a member of the Rajya Sabha?
Q. Which Article provides for the Finance Commission in India?
Q. How many types of emergencies are there in the Indian Constitution?
Q. How is the Vice President of India elected?
Q. The concept of 'Single Citizenship' in India is borrowed from which country?
Q. Which of the following bodies is not mentioned in the Constitution of India?
Q. Who has the power to make laws on subjects in the Union List?
Q. Which Article of the Indian Constitution deals with the Emergency due to breakdown of constitutional machinery in a state?
Q. Who is the custodian of the Indian Constitution?
Q. Which parameter in `FastAPI()` constructor changes the default Swagger docs path?
Q. Which of these is used to define an endpoint that consumes JSON data?
Q. How do you define a nested Pydantic model in FastAPI?
Q. What does `from fastapi.responses import JSONResponse` allow you to do?
Q. Which package is necessary for form parsing in FastAPI?
Q. Which component provides interactive API documentation in FastAPI?
Q. What is the correct way to parse a cookie value?
Q. Which of these features is NOT built-in in FastAPI?
Q. What does `response_model_exclude_unset=True` do?
Q. How are enums defined for query parameters in FastAPI?
Q. How does FastAPI differentiate between a query and body parameter?
Q. How do you redirect a user to another endpoint in FastAPI?
Q. What does `status.HTTP_422_UNPROCESSABLE_ENTITY` indicate?
Q. Which of the following supports sending multiple values for the same query parameter?
Q. What is the default content type of FastAPI responses?
Q. Which of the following methods is used to run background tasks in FastAPI?
Q. How can you disable the ReDoc documentation UI in FastAPI?
Q. Which module is commonly used with FastAPI for SQL database ORM?
Q. What does FastAPI use under the hood to manage the web server?
Q. Which type of response class is best for returning HTML content in FastAPI?
Q. Which of these is true about async support in FastAPI?
Q. What happens when FastAPI detects a mismatch in type for a query parameter?
Q. What does `File(..., media_type='image/png')` specify?
Q. What happens if a route raises a `ValueError` and no handler is defined?
Q. How do you access the full request object in a path operation?
Q. What does `raise HTTPException(status_code=404, detail='Item not found')` do?
Q. Which of the following supports declaring file input in FastAPI?
Q. Which response class is used to return raw bytes data in FastAPI?
Q. Which feature of FastAPI helps with dependency injection?
Q. Which method is used to handle startup events in FastAPI?
Q. Which HTTPException code is used for a forbidden request?
Q. How do you define a regex validation for a path parameter?
Q. Which method is used to define a path operation that accepts a list as input?
Q. How do you access form data sent via POST in FastAPI?
Q. Which response class should be used to return an image in FastAPI?
Q. Which parameter is used to validate a minimum length for a query parameter?
Q. Which of the following is NOT a valid status constant in FastAPI?
Q. What is the correct way to access request headers in a route function?
Q. What does `app.openapi()` return?
Q. Which of the following is true about FastAPI's automatic documentation?
Q. How can you disable Swagger UI in FastAPI?
Q. What is the behavior of FastAPI when you define an endpoint with the same path and method?
Q. How can you define global dependencies for all routes in FastAPI?
Q. Which built-in route serves ReDoc UI in FastAPI?
Q. What does `status.HTTP_401_UNAUTHORIZED` represent?
Q. Which of the following is used to define headers in FastAPI route function?
Q. Which of these is true about Pydantic’s `Field()` in FastAPI?
Q. How does FastAPI return JSON responses by default?
Q. What is required to use OAuth2PasswordBearer in FastAPI?
Q. What does `BaseSettings` class in FastAPI provide?
Q. What does `status_code=204` represent in FastAPI?
Q. What is `FormData` used for in FastAPI?
Q. What does the parameter `description` in `Query()` do?
Q. How can you provide custom exception handling in FastAPI?
Q. How can you modify the title of the OpenAPI docs in FastAPI?
Q. How does FastAPI detect whether a parameter is a path, query, or body parameter?
Q. Which parameter in `Query()` restricts values to a set of choices?
Q. Which method is used to mount sub-applications in FastAPI?
Q. Which file type can be uploaded using `UploadFile` in FastAPI?
Q. Which method allows handling WebSockets in FastAPI?
Q. How does FastAPI know which values to inject into parameters?
Q. Which FastAPI class allows multiple routes to be grouped together?
Q. What is the default OpenAPI version used by FastAPI?
Q. How can you extract a path parameter in FastAPI?
Q. How do you return a redirect response in FastAPI?
Q. Which of the following is used to set CORS in FastAPI?
Q. What is returned by default if no response model is defined in FastAPI?
Q. How do you serve static files using FastAPI?
Q. How can you define default values for query parameters in FastAPI?
Q. Which of the following is used for file uploads in FastAPI?
Q. What happens if a Pydantic model has extra fields not defined in its schema?
Q. How do you define a required query parameter in FastAPI?
Q. Which method is used in FastAPI to test endpoints without an external client?
Q. Which of the following allows response content to be streamed in FastAPI?
Q. Which command installs FastAPI with all optional dependencies?
Q. How can you create dependencies that are only evaluated once per request in FastAPI?
Q. Which function in FastAPI is used to read request body as plain text?
Q. Which of the following is used to validate cookies in FastAPI?
Q. What is the purpose of the `tags` parameter in FastAPI route decorators?
Q. Which of the following methods is used to define a DELETE endpoint in FastAPI?
Q. What is the purpose of `status` module in FastAPI?
Q. Which exception class is used to return custom HTTP errors in FastAPI?
Q. Which module provides `File` and `Form` imports in FastAPI?
Q. Which object is required to use background tasks in FastAPI?
Q. What is the default port when running Uvicorn?
Q. What happens if you use `response_model` in a route?
Q. Which utility helps you build query parameter constraints in FastAPI?
Q. How can you include metadata for a FastAPI application?
Q. How can you restrict allowed methods in CORS in FastAPI?
Q. How can FastAPI automatically convert query strings into complex objects?
Q. How do you specify a maximum length for a query parameter?
Q. What is `Depends()` used for in FastAPI?
Q. Which statement correctly defines a FastAPI app?
Q. What type of function should be used with `await` in FastAPI?
Q. Which HTTP method is typically used to partially update a resource?
Q. How can you automatically document a response model in FastAPI?
Q. Which object gives you access to request metadata in FastAPI?
Q. Which status code should be used when a new resource is successfully created?
Q. What is the use of `Form()` in FastAPI?
Q. Which feature of FastAPI helps in minimizing boilerplate code for request validation?
Q. What happens when you return a Pydantic model from a FastAPI route?
Q. Which tool is FastAPI based on for its routing and middleware?
Q. Where can you view the automatically generated JSON Schema in FastAPI?
Q. How do you return a plain text response from a FastAPI route?
Q. Which FastAPI component allows you to control the response media type?
Q. Which feature makes FastAPI suitable for microservices?
Q. What is the role of the `status_code` parameter in FastAPI routes?
Q. Which file extension is most appropriate for FastAPI modules?
Q. How does FastAPI handle asynchronous programming?
Q. Which statement is true about FastAPI’s data validation?
Q. How do you enable HTTPS in Uvicorn for FastAPI?
Q. Which argument in Field() is used to add a short description to a model field?
Q. How are headers validated in FastAPI?
Q. Which middleware class enables session handling in FastAPI?
Q. What happens if a required query parameter is missing in a FastAPI request?
Q. Which FastAPI function allows you to include routers from other modules?
Q. Which built-in FastAPI response class is used to return HTML?
Q. Which command runs a FastAPI app using Uvicorn?
Q. Which decorator is used to create a POST endpoint in FastAPI?
Q. What is `status.HTTP_201_CREATED` in FastAPI?
Q. What is the recommended way to structure large FastAPI projects?
Q. What happens if type hints are missing in FastAPI route parameters?
Q. How can you automatically reload a FastAPI app during development?
Q. What would `Field(default=None, title='Age')` do in a Pydantic model?
Q. Which parameter in `Path()` ensures a parameter must be greater than zero?
Q. Which tool can auto-generate a client SDK from a FastAPI server?
Q. What is the purpose of `response_model_exclude_unset=True`?
Q. Which keyword is used for declaring asynchronous endpoints?
Q. How can you make a FastAPI route accessible at `/api/items`?
Q. What does FastAPI use to describe request bodies and responses?
Q. How do you return a 404 error from a FastAPI route?
Q. How can you restrict FastAPI CORS policy to specific origins?
Q. What does `Depends(get_db)` typically represent in FastAPI?
Q. Which of the following is a valid media type for JSON responses in FastAPI?
Q. Which statement is true about `UploadFile` in FastAPI?
Q. What is the correct way to install all the necessary extras for file upload support in FastAPI?
Q. Which FastAPI component is used to manage middleware?
Q. How can you enforce numeric range in FastAPI query parameters?
Q. What is the role of `BaseModel` in FastAPI?
Q. Which FastAPI response class can send a file to the client?
Q. How do you manually set the content type of a FastAPI response?
Q. What does the `title` argument in FastAPI decorators do?
Q. Which parameter in FastAPI can restrict query parameter patterns?
Q. Which feature in FastAPI simplifies authentication?
Q. What is a benefit of using `APIRouter` in FastAPI?
Q. How do you install FastAPI and Uvicorn together with optional dependencies?
Q. What is required to serve HTML templates in FastAPI?
Q. Which FastAPI function can limit the number of query results?
Q. How can you disable automatic docs in FastAPI?
Q. What Python feature allows FastAPI to infer data types automatically?
Q. What type is commonly returned by FastAPI route functions?
Q. Which parameter of `Depends()` lets you declare a dependency as optional?
Q. What does the `description` parameter in route decorators affect?
Q. Which FastAPI class allows sending streaming responses?
Q. What is the purpose of the `tags` parameter in route decorators?
Q. What is the correct import path for FastAPI's UploadFile?
Q. In FastAPI, where are custom exception handlers registered?
Q. Which method in FastAPI is used to send a custom response with any content?
Q. Which of the following FastAPI features is most beneficial for frontend developers?
Q. What is the purpose of Laravel Jetstream?
Q. Which Laravel feature is best for reusable frontend logic without JavaScript?
Q. What is returned by the helper function old('name')?
Q. Which file is used to define Laravel scheduled tasks?
Q. What is the default authentication guard used in Laravel?
Q. What is the output of the config('app.name') helper?
Q. How do you mark a model to use soft deletes?
Q. In Laravel, which directory stores compiled Blade templates?
Q. What is the Laravel Echo used for?
Q. What does the 'guard' configuration in auth.php define?
Q. Which Laravel command clears the compiled view files?
Q. Which Laravel method is used to cache routes for performance?
Q. Which file contains route definitions for web pages in Laravel?
Q. What does the method 'abort(404)' do in Laravel?
Q. In Laravel, what is the purpose of a migration?
Q. Which artisan command is used to create a middleware in Laravel?
Q. What does the Laravel method 'withTrashed()' do in Eloquent?
Q. Which Laravel helper returns the base path of the application?
Q. What is the use of Laravel's 'resource' controller?
Q. Which Laravel directory contains the application’s core logic like models and controllers?
Q. Which Laravel directive escapes HTML by default?
Q. What is the purpose of Laravel Livewire?
Q. Which Laravel file contains application-level configuration values?
Q. What does the 'nullable()' method do in migrations?
Q. In Laravel, what is the purpose of the 'policy' class?
Q. Which Blade directive is used for conditional statements?
Q. Which Laravel artisan command is used to run unit tests?
Q. How do you retrieve the last inserted ID using Eloquent?
Q. Which method is used in Eloquent to paginate results?
Q. How do you define a model factory in Laravel?
Q. What is the default queue driver in Laravel?
Q. Which Laravel feature allows broadcasting events over WebSockets?
Q. What is the use of Laravel’s 'tinker' tool?
Q. How can you include a Blade view inside another view?
Q. Which Laravel class helps send notifications?
Q. Which function is used to hash passwords in Laravel?
Q. What does 'php artisan route:list' display?
Q. In Laravel, what does the 'fill()' method do?
Q. Which Laravel command rolls back the last migration batch?
Q. Which method is used to retrieve the first result of a query in Laravel Eloquent?
Q. Which Laravel method is used to create a soft delete column?
Q. What does Laravel's 'artisan' tool help with?
Q. What does the 'nullable' validation rule allow?
Q. In Laravel, what is used to dispatch jobs?
Q. Which command in Laravel is used to publish package assets?
Q. How do you protect a Laravel route using authentication?
Q. Which Laravel component handles sending emails?
Q. What is the purpose of the 'web' middleware group in Laravel?
Q. Which command is used to run seeders in Laravel?
Q. Which Laravel command is used to create a seeder?
Q. In Laravel, where are seeder classes stored?
Q. Which Laravel feature allows you to register multiple routes for a group?
Q. Which method in Laravel is used to flash session data?
Q. Which Blade directive is used for loops?
Q. What is the default session driver in Laravel?
Q. Which artisan command is used to queue jobs in Laravel?
Q. Which directory contains custom helper functions in Laravel?
Q. In Laravel, how do you access the currently authenticated user?
Q. Which class is used to define custom validation rules in Laravel?
Q. What is the purpose of Laravel Sanctum?
Q. Which Laravel command is used to clear the application cache?
Q. Which of the following is used for task scheduling in Laravel?
Q. Which database driver is NOT supported by Laravel out of the box?
Q. What is Laravel Mix primarily used for?
Q. Which method is used to apply a global scope in Laravel models?
Q. Which command creates a model along with a migration?
Q. In Laravel, which helper returns the current application environment?
Q. Which method is used to insert multiple records at once using Eloquent?
Q. What is the default HTTP port used when running 'php artisan serve'?
Q. How do you define a one-to-many relationship in Laravel?
Q. Which Laravel file stores environment-specific configuration?
Q. What does Laravel’s service container primarily manage?
Q. Which command is used to run migrations in Laravel?
Q. What is the default template engine used by Laravel?
Q. Which Laravel command is used to create a new controller?
Q. What does Eloquent in Laravel represent?
Q. Which Laravel feature provides automatic form validation?
Q. Which directory contains Laravel's route files?
Q. Which method is used to define a GET route in Laravel?
Q. What is the purpose of CSRF tokens in Laravel?
Q. In Laravel, which directory contains the middleware files?
Q. What is the default database system used in Laravel configuration?
Q. Which artisan command is used to start a development server in Laravel?
Q. Which file is the entry point for all requests in a Laravel application?
Q. Which command is used to create a new Laravel project?
Q. Which method lets you handle CORS in FastAPI?
Q. What is the role of `Form()` in FastAPI?
Q. Which attribute provides information about the request method in FastAPI?
Q. Which parameter of `File()` allows limiting the file size?
Q. Which function is used to redirect users in FastAPI?
Q. How does FastAPI support OAuth2 authentication?
Q. What is a common use of `Depends()` in FastAPI?
Q. Which parameter type allows you to extract cookies in FastAPI?
Q. How do you create reusable routers in FastAPI?
Q. Which Starlette class does FastAPI use for handling WebSocket connections?
Q. What type does FastAPI expect uploaded files to be?
Q. In FastAPI, how can you handle file uploads?
Q. Which decorator should you use to create a GET route in FastAPI?
Q. How do you set a custom response header in FastAPI?
Q. What will `from fastapi import Depends` do?
Q. How do you define a sub-application in FastAPI?
Q. Which FastAPI feature is used to restrict input values to certain choices?
Q. How can FastAPI validate the length of a query parameter?
Q. What is the correct way to make a parameter optional with a default value in FastAPI?
Q. Which keyword is used in FastAPI to define optional parameters?