Returning string from C function
Either allocate the string on the stack on the caller side and pass it to your function: Or make the string static in getStr: Or allocate the string on the heap:
Either allocate the string on the stack on the caller side and pass it to your function: Or make the string static in getStr: Or allocate the string on the heap: