Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
swapping using call by reference
#include<stdio.h> void swap( int *x, int *y ) // call by refrence { int t ; t = *x ; *x = *y ; *y = t ; printf( "\nx = %d y = %d", *x,*y); } int main( ) { int a = 10, b = 20 ; swap ( &a, &b ) ; // passing the address of values to be swapped printf ( "\na = %d b = %d", a, b ) ; }
run
|
edit
|
history
|
help
1
e
add.c
A_141117_Primo02
data types and printf
32bit
recurs fibo1
22
Taco Code
C/Assembly
Lab 9 v1