x==9 is not an error... it will be 1 when true and 0 when false...and both are executable statements...
when we print float with %d then compiler prints 0...and when we print integer with %f then compiler prints last assigned or printed float value to any float variable....here it is assigned for t.. so it will print t again and again ... On Sat, Sep 17, 2011 at 11:39 AM, praveen raj <praveen0...@gmail.com> wrote: > This will show syntax error due to x==9 and otherwise since memory address > given at the declarAtion there fore x value will. Change at every > assignment , but i m not sure printf will give an error or not . Plz reply. > > On 17-Sep-2011 1:13 AM, "Anshul AGARWAL" <anshul.agarwa...@gmail.com> > wrote: > > > > #include<stdio.h> > > int main() > > {float t; > > long x; > > > > > > t=98; > > printf("%d\n",t); > > printf("%f\n",x); > > { > > x=1; > > printf("%f\n",x); > > { > > > > x=30; > > printf("%f\n",x); > > } > > printf("%f\n",x); > > } > > x==9; > > printf("%f\n",x); > > > > } > > ---------------- > > ----------------------------------------------------------- > > Anshul Agarwal > > Nit Allahabad > > Computer Science > > > > -- > > 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. > -- 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.