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


Please Help Members By Posting Answers For Below Questions

if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

1442


Do pointers need to be initialized?

556


What are the main characteristics of c language describe the structure of ac program?

604


When should the register modifier be used? Does it really help?

607


Describe wild pointers in c?

636






How many types of arrays are there in c?

591


What are the data types present in c?

623


What are the two types of functions in c?

562


Why is event driven programming or procedural programming, better within specific scenario?

1949


Explain is it valid to address one element beyond the end of an array?

729


Is it better to bitshift a value than to multiply by 2?

654


What does s c mean on snapchat?

579


What do you mean by dynamic memory allocation in c?

644


What is typedef?

664


What is a ternary operator in c?

646