Thursday, December 3, 2015

Custom clrscr() function in C

Program #2

#include<stdio.h>
#include<conio.h>
int main(){
  void extnclrscr(void);
  /* Calling custom clrscr() */
  extnclrscr();

  printf("Welcome to Custom clrscr() program!!");
  getch();
  return 0;
}
/* Custom function will do the same
functionality of clrscr(); */
void extnclrscr(){
 for (int i=1;i<=25;i++){
   for (int j=1;j<=80;j++){
     printf(" ");
   }
   printf("\n");
 }
}

1 comment:

  1. AFTER THE MAIN() FUNCTION I HAVE TO CALL THE CUSTOM FUNCTION LIKE
    customclr(){for(i=0;i<=25;i++)
    {for(i=0;i<=80;i++)
    printf(" ");
    }
    printf("\n");
    }
    for using instead of clrscr()

    ReplyDelete

Popular Posts