for a basic ascii checker code of less than 10 lines , i want to print out stuff immediately , instead of after a newline.
i understand that stdout is a bufferedstream , and so it will by default wait for a '\n'. i was looking at this page for some solutions , but so far aint working like me wants...
this is the code :
#include<stdio.h>
int main(){
char c;
while((c=getchar())!=EOF){
if(c == '\n') continue;
fprintf(stderr , " : %d \n" , c);
}
}
i want it to printout like :
A : 65
any help would be highly appreciated.
regards
somjit.