Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Mock Interview Question
#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
Recursive Enumeration Example
Alloc
Array-Based Heap Example Starter Code
Test size_t
UTF-8 in C++11
Dynamic call
2574 EC
return reference (clang)
simple in-memory b-tree
std::reference_wrapper