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
What is union and structure?
Is javascript based on c?
What is function in c with example?
What are the c keywords?
How can I change their mode to binary?
What is the stack in c?
Differentiate abs() function from fabs() function.
How can I insert or delete a line (or record) in the middle of a file?
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
What is the scope of global variable in c?
What is calloc() function?
can any one provide me the notes of data structure for ignou cs-62 paper
Why is it that not all header files are declared in every C program?
When we use void main and int main?
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