Clearing output of a terminal program in Linux C

前端 未结 3 768
栀梦
栀梦 2021-02-04 22:35

I want to clear the output of a C program produced with printf statements. I want to clear only one line, for example:

[source]

printf(\"AAAAAAAAAAAAAA\\         


        
3条回答
  •  不知归路
    2021-02-04 22:53

    I tried answering for what is best expected here.

    printf("AAAAAAAAAAAAAA");
    printf("BBBBBBBBBBBBBB");
    printf("CCCCCCCCCCCCCC");
    //printf("DDDDDDDDDDDDDD");
    

    comment the last line or delete if you dont want to display in terminal. printf("xxxx") is the statement used for printing output in terminal.

提交回复
热议问题