include<stdio.h>#include<stdlib.h>void main() { char *str = (char*)malloc(sizeof(char)*10); //分配地址空间 gets(str); //输入 if(str[0]!='\0') //由于字符串以'\0'结尾,故可以这样来判断 { printf("非空!\n"); } else printf("空\...
publicclassMain{publicstaticvoidmain(String[]args){String[]array1={};// 空数组String[]array2={"Hello","","World"};// 非空数组System.out.println("是否为空数组1:"+isArrayEmpty(array1));System.out.println("是否为空数组2:"+isArrayEmpty(array2));}publicstaticbooleanisArrayEmpty(String[...