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