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 |
in malloc and calloc which one is fast and why?
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
What is void main () in c?
Explain what is the general form of a c program?
int x=5; printf("%d%d%d",x,x<<2,x>>2);
what is difference between overriding and overloading?
how to print 2-D array using a single for loop?
2 Answers Mind Tree, TCS, Value Labs,
What are the differences between new and malloc in C?
When do you say that a digraph is acyclic A)if and only if its first search does not have back arcs B)a digraph is acyclic if and only if its first search does not have back vertices C)if and only if its first search does not have same dfnumber D)None of these
application of static variables in real time
What are the similarities between c and c++?
How can you return multiple values from a function?