need help to wrote a c program.
|
Newbie Member
|
|
| 16Aug2010,19:19 | #1 |
|
hello ppl..can u plz help me in writing a program to calculate the sum of two binary numbers. function prototype shud b char* add(char* n1,char* n2)
|
|
Mentor
|
![]() |
| 17Aug2010,17:50 | #2 |
|
This is not difficult. How far have you got and where are you stuck? How do you plan to handle numbers of different lengths, e.g. add("101","1000"); ? Also does the return value (a char*) point to memory allocated by add(), and if so who is responsible for freeing that memory?
|

