如何判断C的数据类型
比如 typedef ElemType int;
怎么判断 ElemType 是整型呢?
或者
ElemType i;
在给 i 赋值前怎么判断 i 是什么类型呢?
编译的时候编译器知道啊。
编译器会先找到typedef ElemType int; 然后才能够给ElemType i;的i分指定定大小的内存
无法判断.
C++可以有typeid判断,C好像不太好写程序判断
我没有听说过在C语言中如何判定
期待楼下高手
up~~
C是没法判断的
只能自己分析
相关问答:
#include <string.h>
#include <stdio.h>
void main()
{
int i;
char buf[]="abcde";
strncpy(buf,"abc",3);
for(i=0;i <5;i++)
printf(&q ......
一个数如果好等于它的因子之和,这个数就成为"完数",例如6的因子为1,2,3而6=1+2+3,而6=1+2+3,因此6是“完数".编程序找出1000之内的所有完数,并按下面格式输出其因子:6 its factors are 1,2,3
......
struct s1 {
char ch, *ptr;
union {
short a, b;
unsigned int c:2, d:1;
}
struct s1 *next;
};
主要看不懂符号 :
请达人指点一二
http://blog.cechina.cn/true ......
大家帮我看看这个代码,有很多问题,不知道怎么改,小弟在此谢谢了。
#include <stdio.h>
#include <conio.h>
#include <ctype.h>
float date1,date2;
char op;
void ......