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

Value remain same hare....I.E :- X=2,y=3.Because here rules of call by value is applied. If we use call by reference the only value is changed .

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #include called?

1038


what do you mean by enumeration constant?

997


What is abstract data structure in c?

1022


When is a void pointer used?

1223


What is the use of typedef in c?

1021


What is the difference between single charater constant and string constant?

1074


Hai what is the different types of versions and their differences

1930


what does static variable mean?

1088


Why n++ execute faster than n+1 ?

2955


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

1159


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

2055


What is void pointers in c?

989


How can I read data from data files with particular formats?

1028


Describe dynamic data structure in c programming language?

1080


Write a factorial program using C.

1062