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
How can my program discover the complete pathname to the executable from which it was invoked?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
What does volatile do?
What is chain pointer in c?
Explain the difference between #include "..." And #include <...> In c?
Explain what is the benefit of using const for declaring constants?
What does typeof return in c?
What is an lvalue?
What are dangling pointers in c?
What are different types of operators?
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
What is the symbol indicated the c-preprocessor?
What is sizeof array?
What is a header file?
What is ponter?