char input (+1)

what "+1" means in scanf("%s",a+1), when i read array of chars
Who does read? Is it you who read? Ask yourself why are you using a + 1 in scanf.:)

I think that a is the name of the array. It is implicitly converted to the pointer to the first element of the array. So a in expressions is equivalent to &a[0]. a + 1 is the pointer to the next element of the array that is it is equivalent to &a[1].
Last edited on
Topic archived. No new replies allowed.