Charlie Le Quesne was trying out the iPhone 4S at a Tesco store in Coventry when it told him: "Shut the f*** up, you ugly t***."

The boy had been using the phone's Siri system – which answers spoken questions – and had asked it: "How many people are there in the world?"

His mother Kim, 39, a nursery worker, told The Sun: "The phone was a demo version and was low enough on the shelf for Charlie to have a go with it. He asked it a simple question and we couldn't believe the filth it came out with.

"I thought I must be hearing things. So we asked again and the same four-letter stuff blared out.

"I asked for the manager and after staff heard it they agreed to unplug it. I couldn't see the funny side."

Staff told her that someone had tampered with the phone's set-up instructions.

The Siri system addresses the phone's user by name – using information entered in its contact system.

But someone had entered the obscene seven-word phrase as the user's name, so the phone blurted it out when it answered a question.

Tesco said: "We have launched an investigation. The handset will be going back to Apple for diagnostic tests."