o/p : fail 1 between c and u they will be in range so stored as it is but i is -16 converted to 2 complement n become -32 thats y
On Sat, Oct 8, 2011 at 2:02 AM, Rahul Tiwari <rahultiwari6...@gmail.com>wrote: > o/p - fail1 > pass2 > > xplaination - as char range = (-127 to +127) so char c=-64 is ok > so (c>i) condition z not true ......so else part got executed ..... > > but u is unsigned so its actual value z , u = some very high + no. > so i<u cond is true -- so the final o/p --- fail1 pass2 > > if u want to verify then put this sentence in ur code & then run : > printf("%u\n",u); ---- u got ur ans ... > > > > > > On Oct 8, 1:11 am, Raghav Garg <rock.ragha...@gmail.com> wrote: > > i have run the program in turbo c and getting same o/p as i wrote > earlier.. > > which compiler you are using? > > > > On 10/8/11, gaurav yadav <gauravyadav1...@gmail.com> wrote: > > > > > @raghav garg...run the code and see the output,the output comes > > > > > fail1pass2 > > > > > -- > > > 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. > > > > -- > > Thanking you > > > > *With regards- > > Raghav garg > > Contact no. 9013201944www.facebook.com/rock.raghavag > > B. tech (IT), 5th sem > > University School Of Information Technology > > Guru Govind Singh Indraprastha University > > Delhi* > > -- > 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.