Answer:
A and B have different output:
A output will be 1
B output will be 123
Explanation:
A
X = 0
do x < 3
x = x+1
print x
while
B
X = 0
do x = x+ 1
print x
while x < 3
For statement A the condition statement which suppose to be after "while" is not set therefore the value of x will be printed.
For statement B the condition statement is set "x < 3" in front of "while" thereby result in iteration until the condition is false.
Statement A output will be 1
Statement B output will be 123
Answer:
ip = enrollment + section;
Explanation:
The variable ip has been declared to be a pointer to int.
int * ip;
The variable enrollment has been declared as an array of 20 elements .
int enrollment[20];
The variable section has been declared as an int.
int section;
In order to make ip point to the element in the array indexed by section, we can use the following statement :
ip = enrollment + section;
This will make ip point to enrollment[section].
Answer:
The answer is "Option A"
Explanation:
In the given java code, a class "Test" is defined, inside the main method try and catch block is used, inside the try block method "p()" is called, that print a message. in this block two catch block is used, that works on "NumberFormatException" and "RuntimeException". In the method "p" declaration, a string variable "s" is defined, that holds double value, that is "5.6", and converts its value into the wrong integer, and other wrong option can be described as follows:
- In option B, it is wrong, it is not followed by after call method.
- In option C, It is not followed by runtime exception, that's why it is incorrect.
- Option D and Option E both were wrong because they can't give run time and compile-time error.
A computer uses unallocated space also know as free space to keep a file that has been deleted in its disk until a new file takes it spot and overwrites it.
The answer is C to this question