f(x,y,z)
{
y = y+1;
z = z+x;
}
main()
{
int a,b;
a = 2
b = 2;
f(a+b,a,a);
print a;
}

what is the value of 'a' printed

Answer Posted / sachin arora

Answer a=2
because f is a function and that time STACK concept are
used ,in a function last value a is printed and a=2;
so result will b 2

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can I initialize unions?

588


What is the difference between text and binary modes?

638


Explain the difference between the local variable and global variable in c?

595


Explain what is the benefit of using enum to declare a constant?

585


What is "Hungarian Notation"?

633






What are the preprocessor categories?

635


What does sizeof return c?

597


find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }

1855


List some of the dynamic data structures in C?

785


Explain what are preprocessor directives?

623


Explain how can you tell whether a program was compiled using c versus c++?

571


If null and 0 are equivalent as null pointer constants, which should I use?

575


a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f

1583


What is 2 d array in c?

550


Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

3651