Ques 5 might be value of 1+2+'4' https://ideone.com/8b91t Obviously if we use " "", then it represents string and we can't define + operation with other operand being an integer.
On Fri, Aug 12, 2011 at 11:06 PM, Anil Arya <[email protected]> wrote: > Q.5 . [warning] initialization makes integer from pointer without > a cast. > > > On Fri, Aug 12, 2011 at 10:56 PM, sagar pareek <[email protected]>wrote: > >> well if we write the code simply as >> #include<stdio.h> >> int main() >> { >> 1+2+"4" >> } >> >> it gives compilation error >> >> if like this >> #include<stdio.h> >> int main() >> { >> 1+2+"4"; >> } >> >> it will give warning:- no effect of code >> >> >> >> if like this >> #include<stdio.h> >> int main() >> { >> int a= 1+2+"4"; >> printf("%d",a); >> } >> it will give error >> cannot convert char* to int >> >> >> >> On Fri, Aug 12, 2011 at 10:44 PM, aditi garg >> <[email protected]>wrote: >> >>> wats the ans to the 5th ques?? >>> >>> >>> On Fri, Aug 12, 2011 at 8:54 PM, gaurav kumar <[email protected]>wrote: >>> >>>> thanks a lot mate . >>>> >>>> >>>> On Aug 11, 4:51 pm, sindhu <[email protected]> wrote: >>>> > 1. write a method to find the smallest angle between two hands when >>>> > the time is given as input??? >>>> > 2. given a number between 1 to 1000 convert it to words..example >>>> > 235..it should print as two hundred thirty five.. >>>> > 3. write test cases for elevator in a multistory building.. >>>> > 4. a chessboard of size 64 blocks is given..a knight can move two n >>>> > half moves at a time..how many steps will it take to cover all the 64 >>>> > blocks...and change the algorithm if the knight moves three and a half >>>> > moves. >>>> > 5. what will be the result if you execute the following code segment: >>>> > 1+2+"4" >>>> >>>> -- >>>> 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. >>>> >>>> >>> >>> >>> -- >>> Aditi Garg >>> Undergraduate Student >>> Electronics & Communication Divison >>> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY >>> Sector 3, Dwarka >>> New Delhi >>> >>> >>> -- >>> 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. >>> >> >> >> >> -- >> **Regards >> SAGAR PAREEK >> COMPUTER SCIENCE AND ENGINEERING >> NIT ALLAHABAD >> >> -- >> 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. >> > > > > -- > Anil Kumar Arya > computer science & engineering > M.N.N.I.T Allahabad. > > > -- > 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. > -- 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.
