Currently I discovered that I can move the cursor in the terminal output as if I'm writing in Word using "\033[A" to move the cursor in the line above and "\033[B" to below . So I tried to understand something more and I wrote these 2 lines of code in C :
#include <stdio.h>
#include <stdlib.h>
int main (){
printf("\n 2 3 \033[A \033[D 1 \033[B \n 4 5 6");
}
And this is the output :
1
2 3
4 5 6
My expectations were differents because this was my expected output
1
2 3
4 5 6
So I'm missing some informations and I think that probably I need of a character that says "go back of one positions" like "\t" but the opposite. I found this page in some old posts Here
But some characters don't work. Can someone explain me how these stuffs work? Because I tried "\033[C" and "\033[D" to move right and left but nothing.