Domain 4 trap answers — CCA-F Exam Prep

×
L3.140
REAL STORY

A price comparison tool said $99 was more expensive than $1,000. It was comparing strings.

String comparison: '99' > '1000' because '9' > '1' in character order. Every product over $1,000 was ranked as more expensive than everything under $100. Nobody noticed for weeks because the sorting looked 'mostly right.' That's the danger of data type bugs -- they produce results that are almost correct.