Dプログラミング-sizeof演算子
Operator | Description | Example |
---|---|---|
sizeof() | Returns the size of an variable. | sizeof(a), where a is integer, returns 4. |
& | Returns the address of a variable. | &a; gives actual address of the variable. |
* | Pointer to a variable. | *a; gives pointer to a variable. |
? : | Conditional Expression | If condition is true then value X: Otherwise value Y. |
例
Dプログラミング言語で使用可能なすべての雑多な演算子を理解するには、次の例を試してください-
上記のプログラムをコンパイルして実行すると、次の結果が生成されます-