Question
If 19 August 2001 is a Sunday, then what will be the day
of the week on 15 May 2010?Solution
Quick check:
-
Remaining days in 2001 after Aug 19: 12+30+31+30+31=13412+30+31+30+31=134 12 + 30 + 31 + 30 + 31 = 134
-
Full years 2002β2009: 8Γ365+28\times365+2 8 Γ 365 + 2 leap days =2922=2922 = 2922
-
Days in 2010 up to May 15: 31+28+31+30+15=13531+28+31+30+15=135 31 + 28 + 31 + 30 + 15 = 135
Total =134+2922+135=3191=134+2922+135=3191 = 134 + 2922 + 135 = 3191 .
3191βmodβ7=63191 \bmod 7 = 6 3191 mod 7 = 6 . From Sunday, +6 days β Saturday .
In Java, which keyword is used to prevent a class from being inherited?
In C, which function is used to release dynamically allocated memory?
Consider a table Orders with columns OrderID, CustomerID, OrderDate, and TotalAmount. Which SQL query would correctly find the total number of orders an...
- Which of the following is the primary benefit of Big Data analytics in decision-making?
Which of the following sorting algorithms is stable?
In C++, which operator is used to access a member function through a pointer to an object?
Which C++ feature allows functions or operators to have the same name but behave differently?
Which Java keyword is used to inherit a class?
Which of the following is used to declare a list in Python?
In C++, which access specifier allows members to be accessible only within the class?