consider the following C code
main()
{
int i=3,x;
while(i>0)
{
x=func(i);
i--;
}
int func(int n)
{
static sum=0;
sum=sum+n;
return(sum);
}
the final value of x is
Answer Posted / yogendra jain
6
Is This Answer Correct ? | 15 Yes | 2 No |
Post New Answer View All Answers
Can math operations be performed on a void pointer?
How to draw the flowchart for structure programs?
How can I make sure that my program is the only one accessing a file?
what is the height of tree if leaf node is at level 3. please explain
What is difference between class and structure?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
What is pivot in c?
Is malloc memset faster than calloc?
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
Why & is used in scanf in c?
can anyone please tell about the nested interrupts?
Why isn't any of this standardized in c? Any real program has to do some of these things.
Explain what are the advantages and disadvantages of a heap?
What is the newline escape sequence?
Is there anything like an ifdef for typedefs?