I want to limit the number of chars scanf command will get using a define value. The following code worked well
scanf("%20s",&stud->student_name);
but then i have tried that one (MAXNAMELEN is defiend as 20)
scanf("%MAXNAMELENs",&stud->student_name);
and it didn't work. how can I do that using scanf only ?