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
Define recursion in c.
What is the use of pragma in embedded c?
Function calling procedures? and their differences? Why should one go for Call by Reference?
What is the explanation for the dangling pointer in c?
What is the use of function in c?
Which is the memory area not included in C program? give the reason
If you know then define #pragma?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
Explain what is gets() function?
formula to convert 2500mmh2o into m3/hr
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
How can I write a function that takes a format string and a variable number of arguments?
What do you mean by Recursion Function?
What are Macros? What are its advantages and disadvantages?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?