compiler : gcc, OS : Fedora 15 I use ctrl + d to put EOF in files.
you can verify it through this code #include<stdio.h> int main(int argc,char *argv[]) { int c; while((c=getchar())!=EOF) { putchar(c); } if(c==EOF) printf("EOF Break"); return 0; } On Sun, Jul 31, 2011 at 3:05 PM, Puneet Gautam <puneet.nsi...@gmail.com>wrote: > Is it possible to terminate this code(except break) while it is > executing..? For what eof will this terminate..? > > > #include<stdio.h> > main(int argc,char *argv[]) > { int c; > while((c=getchar())!=EOF) > { > putchar(c); > } > } > > Reply fast... > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Abhishek Gupta MCA NIT Calicut Kerela -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.