For most parents, seeing their children spend hours engrossed in computer games can be a source of frustration.

But rather than despair at the misspent hours, mothers and fathers should ask their children questions about how the games work to encourage an interest in coding, according to a GCHQ recruiter.

Parents should foster an “inquisitiveness” about how computer games are constructed so that their children have the opportunity to develop an interest in technology from a young age.

Chris Ensor, deputy director for skills and growth at the National Cyber Security Centre (NCSC) which is part of GCHQ, said that parents play a “huge” role in influencing their children's futute career choices.

“Anything that asks of a child 'why do you think that works?' or 'how do you think it does it like that?' is good,” he told The Sunday Telegraph.

“Some will love it and go and explore, others my not be that interested. But asking those questions is a real way of getting them interested, setting a challenge that some will be really interested in following.”

Mr Ensor said that he has learned from watching his own children play on computer games.

“Many will just play the games and not really understand what its doing. How do you get them to that next level? Take my son, he got a computer for Christmas,” he said.

“He is not interested in technology, but he started to ask: 'how to I get the graphics better? How do I update the memory?' All of a sudden he started to get an interest in how it works.”