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

How many types of sorting are there in c?

0 Answers  


who did come first hen or agg

15 Answers   Infosys,


What are the similarities between c and c++?

0 Answers  


What is variable declaration and definition in c?

0 Answers  


Explain how can you determine the size of an allocated portion of memory?

0 Answers  


why effort estimation is important?

1 Answers  


What is the use of a conditional inclusion statement in C?

0 Answers   Global Logic,


Write a C program to find the smallest of three integers, without using any of the comparision operators.

7 Answers   TCS,


How to delete a node from linked list w/o using collectons?

0 Answers   Zycus Infotech,


I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.

0 Answers   TCS,


#include<stdio.h> #include<conio.h> void main() { float a; clrscr(); a=0.5; if(a==0.5) printf("yes"); else printf("no"); getch(); }

9 Answers   TCS,


Write a program that can show the multiplication table.

0 Answers   Student,


Categories