+ 3
Why can't this code work?
I was learning function pointers and I tried to make this code but it is not working, please help. https://code.sololearn.com/cD6JchGXVMNQ/?ref=app
9 Réponses
+ 3
You were close. Note strcat updates the original so it must be 30 to hold both 15 character strings.
https://code.sololearn.com/c9CuWocUp0Gb
+ 3
John Wells Thank you so much, I was thinking that didn't I learned the lesson well or what.
+ 3
Array and pointers are interchangable. They always pass pointers. Therefore, I like to see pointers to reflect what is passed. Also, your array numbers can become wrong, when you updated the array definition like I did. It does not really matter because C lets you access c[1000] of char c[2], but it makes the code confusing to others.
+ 2
John Wells Can you please tell me why did you change the functions and parameters to pointers?
+ 2
John Wells Thank you again! ^-^
+ 1
I worked on this yesterday and today and I got a solution:
https://code.sololearn.com/c3eLFB6YcuEa
I have just received my C certificate yesterday.
+ 1
Josée Mallah Why isn't your code opening?
+ 1
https://code.sololearn.com/cv750Xx0UphD
This is a new link. The same concept as Mr. Wells
+ 1
Josée Mallah Congo on your certi(sorry, this is so late), I also received my certi a few days ago