How  printf can print 2 values for %s and %f if you provided only 1
(3,x>>1)[*arr] ?

On Jun 24, 12:13 am, Anika Jain <[email protected]> wrote:
> #include<stdio.h>
> typedef struct
> {
>       char *name;
>        double salary;}job;
>
> main()
> {
>     static job a={"tcs",15000.0};
>     static job b={"ibm",25000.0};
>     static job c={"google",35000.0};
>     int x=5;
>     job *arr[3]={&a,&b,&c};
>      printf("%s %f\t",(3,x>>1)[*arr]);
>
> }
>
> it is giving google 35000.000000 there's no error.. i think u r doing some
> mistake by not writing %s as format specifier in printing..
> On Thu, Jun 23, 2011 at 8:20 AM, Piyush Sinha <[email protected]>wrote:
>
>
>
>
>
>
>
> > even I am getting output as google 0.00000
>
> > On 6/23/11, Bhavesh agrawal <[email protected]> wrote:
> > > i got (null) 0.00000 on my gcc compiler , is there any syntax error
>
> > > --
> > > 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.
>
> > --
> > *Piyush Sinha*
> > *IIIT, Allahabad*
> > *+91-8792136657*
> > *+91-7483122727*
> > *https://www.facebook.com/profile.php?id=100000655377926*
>
> > --
> >  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.

-- 
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.

Reply via email to