Question Detail

COM 101 COM 101 Past Questions Objective Question

Question

12. In VB data types, which of the following is correct
Options
A A variable with data type integer can always be assigned to another variable of data type long with no error
Correct Answer
B A variable with data type long can be assigned to another variable of data type int with no error
C Real is a special type of data type in VB
D The integer and decimal data types have the same precision level
Correct Answer

Option A is the correct answer.

Detailed Explanation

Integer values fit into Long (since Long has a larger range), so assignment from Integer to Long is safe.

Hint

Long can hold any Integer value.

Question Info