Write a main() program that calls this function at least 10
times. Try implementing this function in two different
ways. First, use an external variable to store the count.
Second, use a local variable. Which is more appropriate?
Answers were Sorted based on User's Feedback
Answer / banavathvishnu
main()
{
static int i;
while(i<10)
{
i++;
main();
}
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / satya
why not we use if instead of while in the above answer...
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the advantages of Macro over function?
write a program to print sum of each row of a 2D array.
char *p="name"; printf(p);
What is a program flowchart and explain how does it help in writing a program?
any string of bits of length 'n' represents a unique non- negative integer between.............?
#include<stdio.h> #include<conio.h> # define swap(a,b) temp=a; a=b; b=temp; void main( ) { int i, j, temp; i=5; j=10; temp=0; if( i > j) swap( i, j ); printf( "%d %d %d", i, j, temp); }
2. What does static variable mean?
What are header files and explain what are its uses in c programming?
where does it flourished?
to find the program of matrix multiplication using arrays
which operator having lowest precedence?? a.)+ b.)++ c.)= d.)%
How can you allocate arrays or structures bigger than 64K?