swap tag

5 questions


1 answers
124 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
114 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...

1 years ago

1 answers
58 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...

1 years ago

1 answers
124 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=...

1 years ago

1 answers
125 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...

1 years ago

© 2024 OneMinuteCode. All rights reserved.