I have declared an array of size 10. but I want to use only 6/7 of it. Then how can I determine how many numbers/characters are there?
The following code there I have scanned "Stack" that means 5 characters. How to get it? Is there Any easiest way to find this? I've tried by sizeof() but it's just giving me the size that I have declared earlier.
char str[10] ;
scanf("%s",&str); //scanned "Stack"