Answer:
See the code snippet in the explanation section
Explanation:
import java.util.Scanner;
public class BareBonesProgram{
public static void main (String[] args){
Scanner scan = new Scanner(System.in);
System.out.println("Please enter the value of x: ");
int x = scan.nextInt();
int z = 4 * x;
System.out.println("The value of z is: " + z);
System.out.println("The value of x is: " + x);
}
}
Answer:
The answer is B hierchary protocal
Question with options:
What kind of digital certificate is typically used to ensure the authenticity of a web server to a client?
-private
-web server
-public web
-web client
Answer:
Web server digital certificate such as SSL(Secure Sockets Layer) Certificate
Explanation:
Digital certificates are certificates issued by trusted authorities (called Certificate Authority such as Encrypt Certificate Authority) and allow users determine the originality of a resource. With these certificates, users can confirm who the issuer of the certificate is and to whom the certificates are issued. They give users more confidence when using the web.
To determine the authenticity of a web server to a client, a web server digital certificate such as SSL certificate is used.
Answer:
E. Leading the way to a new kind of future for the environment, the economy, and society.
Explanation:
We can look at Sustainability to mean the way of meeting our own needs without compromising the ability of future generations to meet their.
In sustainability the focus is not on the now only, rather it puts into consideration the fate the future generation will face.
Hence, it is Leading the way to a new kind of future for the environment, the economy, and society.
Answer:
Static scoping: x is 5
Dynamic scoping : x is 10.
Explanation:
Static scoping :
In static scoping the variable of a function take the value within the function.
If there is no values exist within the function then take the global value of the variable.
var x // No value is assigned to x so it check global value of x
function sub1() {
document.write(“x = “ + x + “”); // So it print x = 5
}
function sub2() {
var x;
x = 10;
sub1();
}
x = 5; // It is the global value of x
sub2();
Static scoping: x is 5
Dynamic scoping :
In Dynamic scoping the variable of a function take the value all the calling function ends.
If the global value is the last assigned value of a variable then it take that value.
If there exist some other function after global variable value if that function contain the variable with some assigned value variable take that value.
var x
function sub1() {
document.write(“x = “ + x + “”);
}
x = 5; // At this point x value is 5 and check there exist a function
sub2(); // So now call this function
function sub2() {
var x;
x = 10; // The value of x = 5 is replaced with x = 10
sub1();
}
Dynamic scoping : x is 10.