Home > Net >  C Replace Printed Text
C Replace Printed Text

Time:05-20

So I have this script and I want to replace printed "Dont" with "Lets". I don't want to use system() since the effect is different.

#include <stdio.h>

int main(){
    printf("Dont do this");
    /* Replace printed "Dont" with "Lets" */
    return 0; 
}

CodePudding user response:

Try \r:

#include <stdio.h>

int main(){
    printf("Dont do this");
    printf("\rLets");
    printf("\n");
    return 0; 
}
  •  Tags:  
  • c
  • Related