answersLogoWhite

0

// Swapping values of a and b

int a = 1;

int b = 50;

int temp = a; // temp = 1

a = b; // a = 50

b = temp; // b = 1

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the meaning of 'swapping' in computer architecture?

Swapping means to swap the values of two addresses in main memory.


What is meant by swapping of variables?

It means that you swap the values of that variables EX: -==- before swapping :- Variable1 = 5; variable2 = 10; after swapping :- Variable1 = 10; variable2 = 5;


What is swap in c?

swapping is nothing but interchanging the values of a given character for example : if a=5 , b=4 before swapping then it becomes a=4,b=5 after swapping


What has the author Sandra Ball-Rokeach written?

Sandra Ball-Rokeach has written: 'The great American values test' -- subject(s): Belief and doubt, Communication, Influence (Psychology), Social aspects of Communication, Social aspects of Television programs, Social values, Television programs


What has the author Aviva Weisbord written?

Aviva Weisbord has written: 'IMPACT OF PRESESSION INFORMATION REGARDING THERAPIST COUNSELING STYLE AND SIMILARITY OF RELIGIOUS VALUES ON RELIGIOUS JEWISH CLIENTS'


What has the author Jos Vaessen written?

Jos Vaessen has written: 'Dealing with stakeholder values in the evaluation of development programs' -- subject(s): Economic development projects, Evaluation


How do people's values influence their beliefs about social programs and taxation?

People's values influence their beliefs about social programs and taxation in that they either find it necessary to support the programs or oppose them


A questioning attitude regarding psychologists assumptions and hidden values best illustrates?

A questioning attitude regarding psychologist assumptions and hidden values best illustrates critical thinking.


A questioning attitude regarding psychologists and hidden values best illustrates?

A questioning attitude regarding psychologist assumptions and hidden values best illustrates critical thinking.


What is the use of constants and variables in programs?

to store values


What is the purpose of swapping?

Swapping was an older form of memory management. It was moving from/to secondary storage a whole program at a time, in a scheme known as roll-in/roll-out. Now swapping is a fairly close synonym of paging.


What is the process to bring a computer to its usual state?

If a process requests something for which it must wait, it will be blocked. When the process is in the Blocked State, it is eligible for swapping to disk, but this is transparent in avirtual memory system, where blocks of memory values may be really on disk and not in main memory at any time. Note that even unused portions of active processes/tasks (executing programs) are eligible for swapping to disk. All parts of an executing program and its data do not have to be in physical memory for the associated process to be active.