Domain 4 trap answers — CCA-F Exam Prep

PencilPrepPencilPrep
L3.14|Domain 4 trap answers
1/12
Real failures

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

The tool stored prices as 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. The sorting looked 'mostly right.' That is the danger of data type bugs -- they produce results that are almost correct.

Domain 4 traps exploit exactly this kind of almost-correct thinking.