Thu Nov 13, 2008 2:50 pm
#include <stdio.h>
void swap(int *a, int *b)
{
int t = *a;
*a = *b;
*b = t;
}
main()
{
int x = 15, y = 74;
printf("%d %d\n", x, y);
swap(&x, &y);
printf("%d %d\n", x, y);
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.