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 / vignesh1988i

the final value of x is 6

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are enumerated types?

657


How do I determine whether a character is numeric, alphabetic, and so on?

627


Why is c so powerful?

691


Why are algorithms important in c program?

625


Explain what does a function declared as pascal do differently?

644






In c language can we compile a program without main() function?

584


What is the general form of a C program?

600


Explain what are header files and explain what are its uses in c programming?

630


What is c programming structure?

622


Explain what is page thrashing?

613


How can I access an I o board directly?

629


What is build process in c?

647


write a program to print largest number of each row of a 2D array

1875


Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

671


#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }

723