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 .
Answers were Sorted based on User's Feedback
Answer / swaroop
clrscr()
should be after the declaration of variables
| Is This Answer Correct ? | 14 Yes | 1 No |
Answer / 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 |
Answer / sandhiya.g
declaration should made before the clear screen statement
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / khurshid alam
sorry brother your simple mistake following this
printf("%d",a); // here semicolon(;) must be
now run your program
| Is This Answer Correct ? | 0 Yes | 0 No |
read a number & print all its devisors using c-program?
How can I read and write comma-delimited text?
Are c and c++ the same?
code for selection sort?
How to print "I Love My India" without using semi colon?
What is realloc in c?
How do you sort filenames in a directory?
what is the difference between normal variables and pointer variables..............
15 Answers HP, Infosys, Satyam, Vivekanand Education Society,
What is the purpose of the statement: strcat (S2, S1)?
what is the difference between structure and union?
What is the use of the sizeof operator?
What is pointer to pointer in c with example?