tag:blogger.com,1999:blog-959939550345671470.post2805156175536943393..comments2024-03-24T12:51:18.535+05:30Comments on C programming Interview questions and answers: Write a c program to add two very large numbersPriyanka kumarihttp://www.blogger.com/profile/08145649011863585828noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-959939550345671470.post-65747211723924155832014-01-17T19:24:33.678+05:302014-01-17T19:24:33.678+05:30Yeah... this is kind of a nice code, but there'...Yeah... this is kind of a nice code, but there's this minor mistake you're mentioning and the fact that it uses static allocation for those arrays, which is not quite smart. It's easy to modify it though, and use the argc/argv declaration of the main function to dynamically allocate the arrays. Then the only restriction to the length of the input would be your system's stack size Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-73101784246004979182013-04-16T08:11:30.535+05:302013-04-16T08:11:30.535+05:30i dont think so. ac and bc were positioned nicely,...i dont think so. ac and bc were positioned nicely, and algorithm is working backwards.. and copying the excess..Vamsihttps://www.blogger.com/profile/02240709610062236855noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-16425755596572646702013-02-13T12:06:25.298+05:302013-02-13T12:06:25.298+05:30i think..
we can take the size of result array not...i think..<br />we can take the size of result array not same as the greatest number sized.. instead take it greatest number size +1.<br />here in this case we can take 256 size for result array..<br />then there will not be wrong out put in case of carry..<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-63701591410859256422012-08-10T15:58:14.085+05:302012-08-10T15:58:14.085+05:30wenever numbers r unequal n der is a carry d outpu...wenever numbers r unequal n der is a carry d output is incorrect<br />eg : 9+9999rainoreply@blogger.com