The safest thing to do, if you MUST use scanf(), is to immediately remove the left over newline char, from the input buffer:
Code:scanf("%s", string) getchar(); //removes the newline char, will NOT halt and wait for input scanf("%c", &myChar) //now myChar has clean input steam. (void) getchar(); //another way, if the plain getchar() gives you warnings /* to remove several char's from the input stream */ while((ch=getchar()) != '\n'); system("pause"); // is a poor habit to get into.