0
点赞
收藏
分享

微信扫一扫

C语言指针的理解


// demo1.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <stdio.h>

int i ;


void ch (int* a, int* b){

	int p ;

	p = *a ;
	*a = *b ;
	*b = p ;
}


int main()


{



	int i = 3 ;
    int j = 5 ;

	ch(&i,&j) ;
	printf("%d\n",i ) ;


	return 0;
}

 

 

举报

相关推荐

0 条评论