Swap Ponteiros

Run Settings
LanguageC
Language Version
Run Command
#include <stdio.h> #include <conio.h> #include <math.h> #include <stdlib.h> void troca (int *p, int *q){ int temp; printf("Ponteiro p %d\n", p); printf("Ponteiro q %d\n", q); temp = *p; *p = *q; *q = temp; } int main(){ int a = 1, b = 2; troca (&a, &b); printf("\n\n"); getch(); return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines