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 |
how to write palindrome program?
Subtract Two Number Without Using Subtraction Operator
What is the use of static variable in c?
Why is void main used?
what is the syallabus of computer science students in group- 1?
In a switch statement, what will happen if a break statement is omitted?
Define C in your own Language.
main() { int x, arr[8]={11,22,33,44,55,66,77,88}; x=(arr+2)[3]; printf(ā%dā,x); }
write a program in 'c' to find the value of p[i+1]^n.p,i,n are arguments of a macro and n is a integer
Write a code to remove duplicates in a string.
Explain argument and its types.
/*what is the output for the code*/ void main() { int r; r=printf("naveen"); r=printf(); printf("%d",r); getch(); }