Cprogramming-c-sizeof-operator
提供:Dev Guides
Cのsizeofおよび三項演算子
上記の演算子に加えて、 sizeof および*?を含む他の重要な演算子はほとんどありません。 :* C言語でサポートされています。
Operator | Description | Example |
---|---|---|
sizeof() | Returns the size of a variable. | sizeof(a), where a is integer, will return 4. |
& | Returns the address of a variable. | &a; returns the actual address of the variable. |
* | Pointer to a variable. | *a; |
? : | Conditional Expression. | If Condition is true ? then value X : otherwise value Y |
例
次の例を試して、Cで使用可能なその他の演算子をすべて理解してください-
上記のプログラムをコンパイルして実行すると、次の結果が生成されます-