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 |
C program code int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15
Find the O/p of the following struct node { char *name; int num; }; int main() { struct node s1={"Harry",1331}; struct node s2=s1; if(s1==s2) printf("Same"); else printf("Diff"); }
Define Spanning-Tree Protocol (STP)
How can you read a directory in a C program?
print ur name 20,000 times without using inbuilt library functions like printf,scanf,gets,puts,getchar or putchar
How to declare a variable?
1.find the second maximum in an array? 2.how do you create hash table in c? 3.what is hash collision
main() { int a=5; printf(?%d,%d,%d\n?,a,a< <2,a>>2); } Answer: 5,20,1 please explain this code in detail
Write a program to show the change in position of a cursor using c
What is the use of parallelize in spark?
How can you determine the maximum value that a numeric variable can hold?
What is a C array and illustrate the how is it different from a list.