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 |
hi , please send me NIC written test papers to sbabavalli@gmail.com
What is a method in c?
find out largest elemant of diagonalmatrix
Write a program to generate the first n terms in the series --- 9,11,20,31,...,82
Is calloc better than malloc?
What is else if ladder?
Why is c not oop?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
What is the code in while loop that returns the output of given code?
can we have joblib in a proc ?
how can f be used for both float and double arguments in printf? Are not they different types?
what is available in C language but not in C++?
10 Answers CTS, TCS,