Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as C by ROGI ( 13 years ago )
#include <stdio.h>
#include <stdlib.h>

typedef int INT; //int的別名INT 

int main(){
 INT a = 3;//所以可以用INT定義 變數a為3 
 int b = 5;//原本C語言就有的形態int 
 printf( "%d\n", a+b );//型態相同所已可以相加!
 
 //再次驗證一下形態 
 printf( "變數a佔了%d個byte", sizeof(INT));//結果要是4 
 
 

 return 0;
 //你可能會問,typedef要幹嘛用的? 
 //用typedef不外乎就是要增加可讀性 
 //想必你一定是在資結遇到吧ㄎㄎ 
}

 

Revise this Paste

Your Name: Code Language: