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

What is union and structure?

1101


Is javascript based on c?

1050


What is function in c with example?

1131


What are the c keywords?

1183


How can I change their mode to binary?

1096


What is the stack in c?

1118


Differentiate abs() function from fabs() function.

992


How can I insert or delete a line (or record) in the middle of a file?

1007


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. 2) the Event Manager has to send participants to the stage to perform in the order in which they registered. Write a program that will help the Event Manager know who to call to the stage to perform. The Logic should be in Data Structures

3211


What is the scope of global variable in c?

978


What is calloc() function?

1080


can any one provide me the notes of data structure for ignou cs-62 paper

2163


Why is it that not all header files are declared in every C program?

1193


When we use void main and int main?

1064


write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list

2794