I am having a hard time understanding the answers to this question.
Giving the following code:
int: size, size2, j;
float: x;
array[1:30] of int: nums;
For each assignment statement below, circle can or cannot to say whether it can or cannot be fully type-checked at compile time. Assume that an array’s subscript range is considered part of its type. Assume that numeric overflow is not considered a type-error.
A. size = size2 + 1; --> Answer: CAN
B. x = size; --> Answer: CAN
C. nums[j] = 33; --> Answer: CANNOT
D. nums[3] = nums[4]; --> Answer: CAN
E. nums[j] = nums[j+1]--> Answer: CANNOT
Now, compile time errors occur when the program is being converted into machine code where run time errors occur during a program's execution. I have also read up on the following stack overflow question regarding compile vs run time errors: Runtime vs Compile time. After researching both topics, I am still confused how the following answers were derived. Any help would be much appreciated.