In Unix based Systems:

system("clear");

Or for that matter any unix command can be executed in this manner

system("cat myfile.txt");

On a Windows based System

system("cls");

3 comments

  1. uNKNOWN November 2nd, 2009 11:11 am Reply
    #1

    wat will hapen if i use system(‘cat myfile.txt’)

    ???
    ????
    help man :D

  2. unknown1 November 2nd, 2009 11:22 am Reply
    #2

    cant u try and see……..??

  3. satyadeep November 2nd, 2009 3:19 pm Reply
    #3

    system('cat myfile.txt');
    its working -> i have checked it
    the only thing is that it obviously works only on unix based system (cat)

Leave a comment

HTML enabled