cancel
Showing results for 
Search instead for 
Did you mean: 

I have a two dimensional array char as str[2][10].

cjaya.1
Associate II
 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
Karl Yamashita
Lead III
#include "string.h"
 
memmove(str[0]+1, str[0], strlen(str[0]));
str[0][0] = '\n';

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.