I have a two dimensional array char as str[2][10].
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-01-09 3:49 PM
I have assigned the string into the char array as "example\n". How do I put the "\n" character in front of the "example\n". I wanted like this "\nexample\n" on the char array
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-01-09 6:56 PM
#include "string.h"
memmove(str[0]+1, str[0], strlen(str[0]));
str[0][0] = '\n';
Don't worry, I won't byte.
TimerCallback tutorial! | UART and DMA Idle tutorial!
If you find my solution useful, please click the Accept as Solution so others see the solution.
TimerCallback tutorial! | UART and DMA Idle tutorial!
If you find my solution useful, please click the Accept as Solution so others see the solution.
