Answer:
Following are the output of the given code:
Output:
12 20
Explanation:
Description of the code:
- In the java program code, two integer variable "j and k" is defined, that stores a value, that is "10 and 8", in its respective variable.
- After storing the value it uses the "j and k" variable, in this, it increments the value of j with 2, and in the k variable, it adds the value of j and stores the value in k.
- After incrementing the value, the print method is used that prints the value of "j and k", i.e, "12 and 20".
You cant, if you want to change you can create another account :)
Answer:
Program to Plot the power in Watts
voltage=1:200;
resistance=1000;
current=voltage/resistance;
power=current.*voltage;
plot(voltage,power);
xlabel('Voltage in Volts');
ylabel('Power in Watts'); //plot of this program is attached
Program for power in dBW
voltage=1:200;
resistance=1000;
current=voltage/resistance;
power=current.*voltage;
powerdB=10*log10(power);
plot(voltage,powerdB);
xlabel('Voltage in Volts');
ylabel('Power in dBW'); // plot output is also attached
I hope it will help you!
Answer: III
Explanation: An enhanced for loop is the foreach equivalent in .NET, you do not require a index variable.
E.x
Foreach(string str in foo[100]){ // prints all 100 strings in foo, one by one.
Console.WriteLine(str);
}