Swapping

int main(int argc, const char * argv[]) {
    int x=1,y=2,temp;
    NSLog(@"before swapping %i,%i",x,y);
    temp=x;
    x=y;
    y=temp;
    NSLog(@"after swapping %i,%i",x,y);
    return 0;

}
Previous
Next Post »