// #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 `='.

--amar

--
Amarendra A. Godbole / Microsoft ``Services For UNIX'' / These opinions
are _MINE_.
``Be ashamed to die until you have won some victory for humanity.''
--Horace Mann.



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

Reply via email to