swap tag

5 questions


1 answers
140 views
0
US>What is the unit of memory swap-out swap-in for Linux?

How does Linux swap out and swap in memory?Is it per page (approximately 4kb)?Or is it a little larger, internal structural unit around memory management?This is because I think heap fragmentation occ...


1 answers
130 views
0
Use a pointer to address elements in an array

#include <stdio.h>#include <string.h># # define MAX 50typedef struct contact_st{ char Name[10]; char PhoneNumber[13];} } Contact;Contact PhoneBook[MAX];int contactSwap(void* arr, int i, in...

2 years ago

1 answers
66 views
0
I'm going to use the swap function. (It's a simple code, so please answer.)

void swap(int *x, int *y){ int temp; temp = *x; *x = *y; *y = temp; return *x, *y;}int main(){ int a=10, b=20; swap(a, b); printf(a: %d, b: %d, a, b);}If I run this, there will be an error. Why is th...

2 years ago

1 answers
139 views
0
Swap function global variable is not possible

int a,b;void swap(int a, int b);int main(){scanf(%d %d,&a,&b);if(a>b) swap(a,b);printf(%d %d, a,b);for(int i=a;i<=b;i++) printf(%d ,i);}void swap(int a, int b){ int temp; temp=a; a=b; b=...

2 years ago

1 answers
144 views
0
Python Swap

a = 100b = 200print(before 'swap: a = ', a, 'b = ', b)temp = aa = bb = tempprint (after 'swap: a = ', a, 'b = ', b)'''Result------------------------------------------------------------------------Befo...

2 years ago

© 2024 OneMinuteCode. All rights reserved.