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

write a c program to calculate sum of digits till it reduces to a single digit using recursion

0 Answers   IBM,


what is the output of below int n=10; (n++)++; printf("%d",n);

3 Answers  


Using which language Test cases are added in .ptu file of RTRT unit testing???

0 Answers  


Write a program in C to convert date displayed in gregorian to julian date

0 Answers   HCL, Wipro,


Should I learn c before c++?

0 Answers  


3. Program to print all possible substrings. ex: String S St Str Stri Strin String t tr tri trin tring r

3 Answers   Huawei,


what different between c and c++

1 Answers  


a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above

0 Answers  


What is the restrict keyword in C?

2 Answers  


Is c language still used?

0 Answers  


wtite a program that will multiply two integers in recursion function

4 Answers   TCS,


What are the uses of null pointers?

0 Answers  


Categories