Question
What is the primary purpose of cookies in web
development?Solution
Cookies are small pieces of data stored on a user's computer by the web browser while browsing a website. They are primarily used to track user behavior, preferences, and sessions. By storing information such as user preferences, login status, and items in a shopping cart, cookies enhance user experience by personalizing content and remembering past interactions. They enable websites to recognize returning users and provide a more tailored experience. Understanding how cookies work is essential for web developers, as they play a crucial role in maintaining user sessions and personalizing web applications. Option A (To store files) is incorrect because cookies do not store files but rather small data values. Option C (To enhance webpage loading speed) is misleading; cookies do not directly affect loading speeds but can impact user sessions. Option D (To secure data transfer) is incorrect; while cookies can have secure flags, their primary role is not for data security. Option E (To format text) is also incorrect as cookies do not influence text formatting on web pages.
What is the primary function of a firewall in network security?
In a binary search tree (BST), what is true about the left child of a node?
Which of the following is true about the Round Robin (RR) CPU scheduling algorithm?
Which of the following design patterns is primarily used to create objects without specifying the exact class of object that will be created?
Which algorithm is best suited for finding a Hamiltonian cycle in an undirected graph?Β Β Β Β
With either equal or proportional algorithm, a high priority process is treated ___________ a low priority process.
Which of the following is a best practice for securing backup data in an enterprise environment?
Dynamic Programming is preferred over recursion when:
Output of below code
public class Prg {
public static void main(String args[]){
System.out.print("A" + "B" + 'A');
}
...A directed acyclic graph (DAG) has 10 vertices and 15 edges. What is the maximum possible number of topological orderings?