+ 2

Why is my code not giving any output?

https://code.sololearn.com/cTzI6F7fOqex/?ref=app Whenever i run my program, it gives a runtime error. Theres no problem with the syntax but i guess i am using pointers incorrectly here. Could anyone explain whats wrong here. Thanks!!😊

2nd Nov 2018, 3:21 AM
Yusha Arif
Yusha Arif - avatar
3 Antworten
+ 3
You had non-space characters as your indents. Your code doesn't quite work (kept a space and lost a character.) https://code.sololearn.com/cAnHp8cd1cNR
2nd Nov 2018, 4:03 AM
John Wells
John Wells - avatar
+ 3
Sorry, I missed your post notification. I fixed my code, if you still care.
9th Nov 2018, 2:37 AM
John Wells
John Wells - avatar
+ 1
Thanks alot John Wells for pointing out the mistake. I still dont quite understand the problem here. I do realize that my program keeps a space and loses a character but i dont quite understand why that is the case. Like am i finding the wrong values for first and last or is there a problem in my string (trimmed). Thanks!!
2nd Nov 2018, 5:04 PM
Yusha Arif
Yusha Arif - avatar