Posted By:
4 Oct, 2013 1:43 am PDT

Create header file for own clrscr() in C language.

Write a code for clrscr() named "cls" and assign it as a header file named "cls.h" in 'C' language.

Attachment:None


//Coding

void cls()

{

int i;

for(i=0;i<25;i++)

printf("\n");

gotoxy(0,0);

}

//save it on notepad named "cls.h"

//copy this file in the forder named HEADER in 'C' compiler.


Was it useful?  



//Coding

void cls()

{

int i;

for(i=0;i<25;i++)

printf("\n");

gotoxy(0,0);

}

//save it on notepad named "cls.h"

//copy this file in the forder named INCLUDE in 'C' compiler.


Was it useful?  



I COULD NOT UNDERSTAND SO FAR THE DIFFERENCE BETWEEN "VOID" AN "INT".

HOW AND WHERE CAN WE USE IT.


Was it useful?  



VOID should be used when you don't want to return a value  to your calling 

function.But when you want to return a value,INT,or any data type comes into

picture depending on which type of data you want to return.


Was it useful?  




Please login to reply to this problem.