Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
you keep incrementing the
str
pointer. When youreturn
it, it is pointing to the nul-terminator, so it's effectively an empty string. Also, you overflow thechar
datatype by adding13
to the last ASCII letters (e.g.'z' + 13
)sizeof(int *)
is wrong, should besizeof(int)
.asprintf
is not standard712,577,413,488,402,631,964,821,329 is bigger that the space for read using %ld Long int -> 2,147,483,647 https://en.wikipedia.org/wiki/C_data_types
you need work with parts of numbers using a string for keep the total
This comment is hidden because it contains spoiler information about the solution
It's written in the description :
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The kata is great imo, but is seems pretty similar to this one (please correct me if i'm wrong!).
This comment is hidden because it contains spoiler information about the solution
Hey, guys, I'm having trouble with this one... Here's my code:
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
char *strsum(const char *a, const char *b){
char *str;
}
But i keep receiving the following error:
*Actual: -2
Expected: 712577413488402631964821329
Arg A: 712569312664357328695151392
Arg B: 8100824045303269669937
I'm almost sure this is a overflow error... However I don't know how to solve it... Can someone help me out?
This comment is hidden because it contains spoiler information about the solution
Wooow, thank you, man! Silly mistake.. XD
Read this. Check how you calculate
r
, isn
an int?This comment is hidden because it contains spoiler information about the solution
Loading more items...