// #include<stdio.h>
// int main(void){
//
// char c;
// int i;
// printf("\nEnter a number: ");
//         scanf("%d",&i);
//
// if(c=getchar()!='n')
//     printf("\ntest ok %c\n",c);
// }

>I have lost track of the context of this question, but one thing I can
>see from this program is the wrong precedence that is used in the if
>statement. It should be  if((c=getchar())!='n'). [note the extra
>brackets around c=getchar(), as the precedence of `!=' is higher than
>that of `='.

Ok, but still the pgm is not waiting for the second input. I want this sort
of program to wait for the input. But it is not bothering about the
getchar(). In fact it is taking the previous input which is given to the
scanf.

Thanks for all
-Logu



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to