Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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; } ..

Answer / ravi

no change in value of a.
i.e,a = 2 only .

Is This Answer Correct ?    7 Yes 0 No

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; } ..

Answer / e-mail

a=2

Is This Answer Correct ?    4 Yes 0 No

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; } ..

Answer / fazlur

Yes the answer will b 2 because the variable a is local to
the main function only.so the value of a will not b changed.

Is This Answer Correct ?    3 Yes 0 No

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; } ..

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

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; } ..

Answer / rahul

6

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More C Interview Questions

what is the output of below pgm? void main() { int i=0; if(i) printf("pass"); else printf("fail"); }

4 Answers  


how to compare two strings without using strcmp() function??

1 Answers  


What is function what are the types of function?

0 Answers  


What is the basic structure of c?

0 Answers  


How do we select the big element or any other operation from array which is read dynamically. user need to give the elements only no need to mention the size.

0 Answers  


the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?

0 Answers  


Explain what is wrong in this statement?

0 Answers  


#include<stdio.h> #include<conio.h> void main() { clrscr(); int a=0,b=0,c=0; printf("enter value of a,b"); scanf(" %d %d",a,b); c=a+b; printf("sum is %d",c); getch(); }

2 Answers  


which will be first in c compiling ,linking or compiling ,debugging.

3 Answers   Sonata,


what is the maximum no. of bytes calloc can allocate

4 Answers   Mphasis,


what is the difference between arrays and linked list

26 Answers   MAHINDRA, Tech Mahindra, Wipro,


What will happen when freeing memory twice

2 Answers  


Categories