<> Using pointers and functions to exchange the values of two numbers

-----------------------------------------------------------------------------------------
C Language source code
#include<stdio.h> // Using pointers and functions to exchange the values of two numbers void Exchange(int* p,int* q)// Exchange function { int tmp;
tmp= *p; *p = *q; *q = tmp; } int main() { int a = 10; int b = 20; printf(
" Before exchange a=%d,b=%d\n",a,b); Exchange(&a,&b);// When calling a function , Separately a and b The address of is passed into the exchange function as an argument printf(
" After exchange a=%d,b=%d",a,b); return 0; }

-----------------------------------------------------------------------------------------
results of enforcement

Day3---------------------------------------------------------------------------------

Buy porridge in the canteen , A girl nearby said she wanted millet porridge , As a result, my aunt gave me two copies of money , The girl swiped the card and asked : Has the price of porridge gone up ? Aunt looked at me and asked the girl : Aren't you lovers ? The girl turned her head and looked at me and said with a smile : No . It feels good to have a girlfriend T^T

Technology
©2019-2020 Toolsou All rights reserved,
Android Using wechat in H5 Payment result refresh during payment shock !!C++ Can make a sound ! Basic operation of single linked list C Language explanation Java Implement an epidemic number management system 2021 year 11 World programming language ranking linux upper mysql Invalid command _linux lower mysql The command is useless Java project : Campus dormitory management system (java+jsp+javaweb+mysql+ajax) Wechat applet development project directory linux ubuntu Which version ,Ubuntu Which version is the best ?python Code painting cherry blossoms - How to use Python Draw a beautiful cherry blossom