Answer:
//here is code in java.
import java.util.*;
class Solution
{
// main method of class
public static void main (String[] args) throws java.lang.Exception
{
try{
// declare an initialize first string variables
String st1="hello";
// declare an initialize first string variables
String st2="world";
// create another string variable
String st3;
// exchange the value of both string variables
st3=st1;
st1=st2;
st2=st3;
System.out.println("value of first String after exchange: "+st1);
System.out.println("value of second String after exchange: "+st2);
}catch(Exception ex){
return;}
}
}
Explanation:
declare and initialize two string variables.Create another string variable "st3". first assign value of "st1" to "st3" after then value of "st2" to "st1" and then assign value of "st3" to "st2". This will exchange the values of both the string.
Output:
value of first String after exchange: world
value of second String after exchange: hello
Answer:
Social Engineering
Explanation:
Even if you invest in the best possible security infrastructure for your corporate network, you will still be vulnerable to attacks which exploit human shortcomings. An example is where an attacker manipulates a company employee to get the system access password in return for a favour. Now he can use the password to bypass all security infrastructure and gain access to critical data and code.
Over the years, operating systems have sought to be more efficient, which is why it is vital that the use of main memory such as ram be as intelligent as possible, so that operating systems are more efficient.
Segmentation is a process of dividing the program into logical units, such as sub functions, arrays, variables, etc., making it possible to have processes divided into pieces so that it is easy to access each of the processes that this leads to its execution. Segmentation allows the programmer to contemplate the memory as if it had several address spaces or segments. References to memory consist of an address of the form segment number - offset.
Pagination is a technique where memory space is divided into physical sections of equal size, called page frames. The programs are divided into logical units, called pages, that are the same size as the page frames. In this way, an information page can be loaded in any page frame. The pages serve as an information storage unit and transfer between main memory and auxiliary or secondary memory. Each frame is identified by the frame address, which is in the physical position of the first word in the page frame.
I = V/R. So the answer is 9/200 = 0.045A = 45mA which is B
Answer:
def leap_year(y):
if y % 4 == 0:
return 1
else:
return 0
def number_of_days(m,y):
if m == 2:
return 28 + leap_year(y)
elif m == 1 or m == 3 or m == 5 or m == 7 or m == 8 or m ==10 or m == 12:
return 31
elif m == 4 or m == 6 or m == 9 or m == 11:
return 30
def days(m,d):
if m == 1:
return 0 + d
if m == 2:
return 31 + d
if m == 3:
return 59 + d
if m == 4:
return 90 + d
if m == 5:
return 120 + d
if m == 6:
return 151 + d
if m == 7:
return 181 + d
if m == 8:
return 212 + d
if m == 9:
return 243 + d
if m == 10:
return 273 + d
if m == 11:
return 304 + d
if m == 12:
return 334 + d
def days_left(d,m,y):
if days(m,d) <= 60:
return 365 - days(m,d) + leap_year(y)
else:
return 365 - days(m,d)
print("Please enter a date")
day=int(input("Day: "))
month=int(input("Month: "))
year=int(input("Year: "))
choice=int(input("Menu:\n1) Calculate the number of days in the given month.\n2) Calculate the number of days left in the given year.\n"))
if choice == 1:
print(number_of_days(month, year))
if choice == 2:
print(days_left(day,month,year))
Explanation:
Hoped this helped