Hi Everyone,
I'm getting the error Lvalue required when I'm compiling the following program
When i changed the line to the following it is runnig fine.Code:#include <stdio.h> int main() { int a=1,b,c; clrscr(); c=(a>5)?b=5:b=4; /* here it is giving the error */ printf("c=%d\tb=%d\n",c,b); getch(); return 0; }
can anyone explain to me what is the reason for the error in the first case.Code:c=(a>5)?b=5:(b=4);
Regards,