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
Is multithreading possible in c?
When is a “switch” statement preferable over an “if” statement?
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
How can I call a function with an argument list built up at run time?
what are the facialities provided by you after the selection of the student.
What are pointers? Why are they used?
Are there any problems with performing mathematical operations on different variable types?
Difference between strcpy() and memcpy() function?
How can I automatically locate a programs configuration files in the same directory as the executable?
What is difference between array and pointer in c?
What is string constants?
What are structure types in C?
what are the 10 different models of writing an addition program in C language?
What is break statement?
What are the __date__ and __time__ preprocessor commands?