Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

when i declare as:
void main()
{
clrscr();
int a=10;
printf("%d",a)
}
my problem that why generate a error in above programs.
please tell me answer seriously .

Answer Posted / pushpendra chauhan

the clear screen function clrscr() is not allowed before declaration of the variables in c....but if you will save your
program with .cpp extension then it will work ....bcoz it is allowed in c++.and you also dint put semicolon ; after printf statement...

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is multithreading possible in c?

1015


When is a “switch” statement preferable over an “if” statement?

1153


we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above

1164


How can I call a function with an argument list built up at run time?

1248


what are the facialities provided by you after the selection of the student.

2265


What are pointers? Why are they used?

1185


Are there any problems with performing mathematical operations on different variable types?

1040


Difference between strcpy() and memcpy() function?

1155


How can I automatically locate a programs configuration files in the same directory as the executable?

1175


What is difference between array and pointer in c?

1098


What is string constants?

1152


What are structure types in C?

1105


what are the 10 different models of writing an addition program in C language?

1897


What is break statement?

1125


What are the __date__ and __time__ preprocessor commands?

1121