Which among the following are the correct representation of "float(4,2)"?
A. 24.33
B. 124.4
C. 12.123
D. Both 24.33 and 124.4
Answer: Option D
Solution (By Examveda Team)
This question is about how MySQL stores numbers with decimal points."float(4,2)" tells MySQL to store a number with a total of 4 digits and 2 digits after the decimal point.
Let's break down the options:
Option A: 24.33 - This fits the format because it has 4 total digits (2 before the decimal and 2 after).
Option B: 124.4 - This also fits the format because it has 4 total digits (3 before the decimal and 1 after).
Option C: 12.123 - This does not fit the format because it has 5 total digits (2 before the decimal and 3 after).
The correct answer is Option D: Both 24.33 and 124.4 because both of these numbers fit the "float(4,2)" format.

Join The Discussion