That is actually OK. The string literal is usually allocated in an immutable memory area that remains available for as long as your program is running.
See also the answers to when does c/c++ allocate string literals.
More Related Contents:
- make: Nothing to be done for `all’
- Does C have a “foreach” loop construct?
- How to do an specific action when a certain breakpoint is hit in GDB?
- Function pointer as an argument
- lvalue required as increment operand
- How to create a new Linux kernel scheduler
- Function declaration inside of function — why?
- What is “-1L” / “1L” in C?
- Reading Other Process’ Memory in OS X?
- executing default signal handler
- how to detect a file is opened or not in c
- Code for malloc and free
- Executing a shared library on Unix
- ftell at a position past 2GB
- How to tell GCC to generate 16-bit code for real mode
- An interesting C linked list idiom
- STM32 how to get last reset status
- pow() cast to integer, unexpected result
- How to get the size of a C function from inside a C program or with inline assembly?
- Duplicated output using printf() and fork() in C
- What is the meaning of a dot (.) after an integer in c?
- Iterating over same type struct members in C
- How can I malloc a struct array inside a function? Code works otherwise
- Parse CSV file in C [closed]
- GCC – no warning about an uninitialized array with -O0
- How to write/read to FLASH on STM32F4, Cortex M4
- Use of exit() function
- C Memory Management
- conflicting types error when compiling c program using gcc
- What’s the difference between “C system calls” and “C library routines”?