Will scanf skip white space characters before reading non-white space characters or any other data with all the the format specifiers like %d , %c , %s and all the other format specifiers.I am talking about the first occurrences of white space characters and not the subsequent ones. for example,
#include<stdio.h>
#define N 10
int main(void){
char str[N];
scanf("%s",str);
return 0;
}
In this case scanf will skip first occurrences of white space characters and read the next non-white space data and then if it again encounters white space characters , it will quit reading.
str
has an incomplete type. You need to specify an array size. – Jonathan Leffler