Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Buggy Strcat clang
#include <iostream> #pragma GCC \ diagnostic \ ignored \ "-Wreturn-stack-address" #include <string.h> const char* strcat(const char* a, const char* b) { char buf[512]; size_t aLen = strlen(a); strcpy(buf, a); strcpy(buf+aLen, b); return buf; } int main() { const char* a = "hello, "; const char* b = "world"; std::cout << strcat(a, b) << std::endl; return 0; }
run
|
edit
|
history
|
help
0
insertion sort
Integer conversions
ArrayList Example Starter Code 2
std::reference_wrapper
HerbSutter-Virtuality
projecte1
Throttle Example using circular queue (push all but 2 less than maxSize; then pop all but 2 less than current size)
Test bitfields with unnamed union
Te
Palindrome Recursive Function Example