@Ashima.. u r right...it is always printing first float variable value.... On Sat, Sep 17, 2011 at 2:05 PM, Ashima . <ashima.b...@gmail.com> wrote:
> @yogesh : but if in place of x=1 in above code, I write t=54. that means i > m assigning somevalue to a float variable.Then it should print 54 > afterwards. > but its again printing 98. how does it go with ur concept. > Ashima > M.Sc.(Tech)Information Systems > 4th year > BITS Pilani > Rajasthan > > > > > On Fri, Sep 16, 2011 at 11:46 PM, abhinav gupta <abhinav....@gmail.com>wrote: > >> @yogesh :ya u right..... >> >> >> On Sat, Sep 17, 2011 at 11:58 AM, sukran dhawan >> <sukrandha...@gmail.com>wrote: >> >>> x== 9 is not an error !!! it simply returns a non zero value if its true >>> and 0 if its false >>> >>> 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. >>> >> >> -- >> 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.