简体   繁体   中英

C Replace Printed Text

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; 
}

Try \r :

#include <stdio.h>

int main(){
    printf("Dont do this");
    printf("\rLets");
    printf("\n");
    return 0; 
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM