Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!deimos.cis.ksu.edu!uxc!uxc.cso.uiuc.edu!ux1.cso.uiuc.edu!uxe.cso.uiuc.edu!burkie From: burkie@uxe.cso.uiuc.edu Newsgroups: comp.lang.c Subject: scanf(..) Message-ID: <225800176@uxe.cso.uiuc.edu> Date: 2 Jun 89 22:20:00 GMT Lines: 29 Nf-ID: #N:uxe.cso.uiuc.edu:225800176:000:443 Nf-From: uxe.cso.uiuc.edu!burkie Jun 2 17:20:00 1989 char c; ... scanf("%c", &c); ... I find that sometimes the program above doesn't stop at the scanf to wait for input, esp. if there are other input, print etc. statements.. Do I have to flush some buffers etc for this to work properly? In response to int x, y; while (...) { scanf("%d, %d", &x, &y); } if I type 'a' on the keyboard, why does the loop keep running, skipping over the scanf ? Thanks. -Salman burkie@uxe.cso.uiuc.edu