What about (2)?, will it always work? On Sat, Jul 23, 2011 at 3:13 AM, prasanth <prasanth270...@gmail.com> wrote:
> > > the CFG was actually > s->AB > A-> a| BaB > B->bbA > > The false statement i guess was "This grammar doesnt produce a string > of 4 consecutive bs" > > > and 2 or 3 questions mainly focused on j&=j-1 guess this unsets the > rightmost set bit > > > pointer related questions were asked.One such was > > (1)int arr[2][3]={{1,2,3},{4,5,6}}; > int (*ptr)[3]=&a[0]; > printf("(%d,%d)",(*ptr)[1],(*ptr)[2]); > ptr+=1; > printf("(%d,%d)",(*ptr)[1],(*ptr)[2]); > > find the output??? > > (2) double full(double a) > { > return (int)(a+0.5); > } > > does this always work?? > > (3) int x=123,y=231; > int t=0; > int l; > l=x^y; > while(l) > { > t++; > l&=l-1; > } > printf("%d",t); > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > 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 algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.