c指针点滴2之比大小

 #include <stdio.h>
#include <stdlib.h> void main2()
{
int a[]={,,,4.5};
int *p1 = &a[];
int *p2 =&a[]; if(p1<p2)
{
printf("p1在数组的位置更靠前");
}else{
printf("p2在数组的位置更靠前"); } }
void main1()
{
int num1,num2;
int *p1 = &num1;
int *p2 = &num2;
*p1 = ;
*p2 = ;
printf("\nnum1=%d,nmu2=%d",num1,*p1);
printf("\nnum1=%d,nmu2=%d",num2,*p2);
printf("\n%p%p",&num1,p1);
printf("\n%p%p",&num2,p2);
//地址的比较没有意义 只能判断谁的地址
if(p1>p2)
{
printf("\np1的地址比较靠后\n");
}else
{
printf("\np2d的地址比较靠后");
}
system("pause");
}
上一篇:【Selenium专题】FAQ_浏览器_ChromeDriver版本导致报错


下一篇:layui数据表格的td模板