天天看点

0地址

0地址解析

#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>

#include<stdlib.h>

void swap(int *a, int *b)

{

int *tmp = NULL;  

*tmp = *a;
*a = *b;
*b = *tmp;
           

}

int main( void)

{

int a, b;

a = 3;

b = 5;

printf(“a=%d\n b=%d\n”, a, b);

swab(&a, &b);

printf(“a=%d\nb=%d\n”, a, b);

system(“pause”);

}