Smacking children can lead to future behavioural problems and worse exam results, according to new research.