Answer: static
Explanation:
variables when declared static gets called statically meaning whenever a function call is made it get stored and it is not required to get the variable again when the function is again called. There scope is beyond the function block
Answer:
I think it's A, def drawDiamond():
Explanation:
Answer:
//here is code in c++.
#include <bits/stdc++.h>
using namespace std;
int main()
{
// variable
int temp;
cout<<"Please enter the temperature:";
//read temperature from user
cin>>temp;
int n;
// reduce the case for switch
n=temp/10;
// print output according to the switch case
switch (n) {
case 7:
case 6:
cout<<"tennis"<<endl;
break;
case 5:
case 4:
cout<<"golf"<<endl;
break;
default:
if(temp>=80)
cout<<"swimming"<<endl;
else
cout<<"skiing"<<endl;
break;
}
return 0;
}
Explanation:
Read the value of temperature from user and assign it to variable "temp".
Calculate n=temp/10, to limit the number of cases in the switch statement.
if temperature is greater or equal 60 & less than 80, it will print "tennis".
If temperature is greater or equal 40 & less than 60, it will print "golf".
in default case, if temperature is greater than 80, it will print "swimming".
if less than 40, print "skiing".
Output:
Please enter the temperature::67
tennis
Answer:
Option C is the correct answer for the above question
Explanation:
Authentication is used to grant a person to use the system so that no other person can hack the data of the system. It is done by some unique id which is provided to the user of that system. When any person wants to use the system he needs to use that a unique id and sometimes password and some other information to use the system.
The above question asked about the process through which the user of the system grants access to use the system only. So the process is Authentication. hence Option C is correct because it states about the process Authentication while the other is not because--
- Option a states Credibility which is not the process to enter the system.
- Option b states Authorization which is used if the system gives access to the user, not the user can take on its own.
- Option d states Honesty which is not the process to enter the system.