Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/06/07 17:17
Read: times


 
#140326 - weekend quiz?
Responding to: ???'s previous message
Matthew, this looks like one of those weekend quizes here - "guess what does this one do"... :-)

You might have given perhaps a hint of explanation, such as... if you take value, multiply by 2, then copy aside and multiply by 4, then add all up, it's the same as multiply by 10...

But once writing in C, supposedly a high-level-language (-ish :-) ) I see absolutely no reason to make it easier for the compiler/mcu and avoid the multiply...

Also, if you return int, the error value could be something like -1, couldn't it...

JW (the C-hater)

List of 39 messages in thread
TopicAuthorDate
String to decimal numbers            01/01/70 00:00      
   Piece of cake            01/01/70 00:00      
      Answer is correct - just do it 4 times!            01/01/70 00:00      
      No, Andy -- Joe\\\'s answer is not correct            01/01/70 00:00      
         simpler????            01/01/70 00:00      
            Simpler            01/01/70 00:00      
               scanf, printf....            01/01/70 00:00      
               scanf()            01/01/70 00:00      
                  Warnings well taken.            01/01/70 00:00      
         My response shows how to do it            01/01/70 00:00      
            the 1-line solution            01/01/70 00:00      
               Now that we\'re being silly ...            01/01/70 00:00      
                  I'm tempted to give it a "+1 Good answer" :-)            01/01/70 00:00      
                  As Cryptic as it can get.. (for me)            01/01/70 00:00      
                     Don't try this at home!!!            01/01/70 00:00      
                        Maybe try at home but NOT with the client !            01/01/70 00:00      
                  all 4 numbers, printf-ed, all in one for            01/01/70 00:00      
                     One small correction            01/01/70 00:00      
                        The world would come to a voilent end.            01/01/70 00:00      
                           this was nothing...            01/01/70 00:00      
                              Jan loves C ??? World go KAABOOM!!            01/01/70 00:00      
                     Jan, you are a wild man!!!            01/01/70 00:00      
                        I am cool serious.            01/01/70 00:00      
                           I've been learning C too!            01/01/70 00:00      
                              K&R            01/01/70 00:00      
                                 K&R * 3            01/01/70 00:00      
                                    The separation of AWK and Perl duly noted            01/01/70 00:00      
                                    I only have the one...            01/01/70 00:00      
   How about...            01/01/70 00:00      
      weekend quiz?            01/01/70 00:00      
         Ok, so it might have been a bit cryptic            01/01/70 00:00      
   Uncanny Adverts            01/01/70 00:00      
      OT - Google magic            01/01/70 00:00      
         Missed concepts..            01/01/70 00:00      
            Be careful            01/01/70 00:00      
               gets() is differently bad            01/01/70 00:00      
                  still better than scanf()            01/01/70 00:00      
                     or, don't bother with the stdlib etc. at all            01/01/70 00:00      
                        for me, replace 'rarely' with 'never'            01/01/70 00:00      

Back to Subject List