0% found this document useful (0 votes)
32 views1 page

Void Main (Void) (Int X - Swap (Int, Int ) - ) Swapt (Int X, Int Y) Int Temp 0 Temp X X y y Temp )

This C code defines a Swap function that takes two integer pointers as parameters, uses a temporary integer variable to store the value of the first pointer, assigns the value of the second pointer to the first, and then assigns the temporary variable to the second pointer, swapping the values pointed to by the two pointers.

Uploaded by

Jaya Vakapalli
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views1 page

Void Main (Void) (Int X - Swap (Int, Int ) - ) Swapt (Int X, Int Y) Int Temp 0 Temp X X y y Temp )

This C code defines a Swap function that takes two integer pointers as parameters, uses a temporary integer variable to store the value of the first pointer, assigns the value of the second pointer to the first, and then assigns the temporary variable to the second pointer, swapping the values pointed to by the two pointers.

Uploaded by

Jaya Vakapalli
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Void

main(void)
{
int x;
------Swap(int *,int
*)
-----}

Swapt(int *x,int *
y)
int temp = 0;
temp = *x;
*x = *y;
*y = temp;
}

x
y

4/16/12

You might also like