this is something like this thats why it is giving lvalue required.
u r going to store the the value over value which is not a variable at left
hand side.
main(){int a=10,b;
(a>=5?b=10:b)=20;printf
<http://www.opengroup.org/onlinepubs/009695399/functions/printf.html>("%d\n",b);}
On Mon, Jul 11, 2011 at 12:47 PM, geek forgeek <[email protected]>wrote:
> #include<stdio.h>
> main(){int a=10,b;
> a>=5?b=10:b=20;printf
> <http://www.opengroup.org/onlinepubs/009695399/functions/printf.html>("%d\n",b);}
>
> y this is asking for lvalue
> while this(below) not?
>
>
> #include<stdio.h>
> main(){int a=10,b;
> a>=5?b=10:(b=20);printf
> <http://www.opengroup.org/onlinepubs/009695399/functions/printf.html>("%d\n",b);}
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
--
Regards
Aditya Pratap
MCA II
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.