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

6)swap(int x,y)
{
int temp;
temp=x;
x=y;
y=temp;
}
main()
{
int x=2;y=3;
swap(x,y);
}
after calling swap ,what are yhe values x&y?

Answer Posted / selloorhari

After calling the function swap(), the values of x,y will be
the same.

i.e. x = 2, y = 3.

The scope of the variables x,y,temp in the swap() function
lies inside the function swap() itself. So there will not be
any change in the values of x,y in the main() function..

Is This Answer Correct ?    17 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I read a binary data file properly?

1251


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

2179


Where define directive used?

1146


C program to find all possible outcomes of a dice?

2410


Why is C language being considered a middle level language?

1212


differentiate built-in functions and user – defined functions.

1148


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

1152


What is the use of #define preprocessor in c?

1123


how to capitalise first letter of each word in a given string?

1983


Can the “if” function be used in comparing strings?

1110


exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above

1182


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

1134


Is this program statement valid? INT = 10.50;

1234


What functions are in conio h?

1265


Explain how are portions of a program disabled in demo versions?

1173