Objective-c-sizeof-operator
提供:Dev Guides
Objective-Cのsizeofおよび三項演算子
Operator | Description | Example |
---|---|---|
sizeof() | Returns the size of an variable. | sizeof(a), where a is integer, will return 4. |
& | Returns the address of an variable. | &a; will give actual address of the variable. |
* | Pointer to a variable. | *a; will pointer to a variable. |
? : | Conditional Expression | If Condition is true ? Then value X : Otherwise value Y |
例
次の例を試して、Objective-Cプログラミング言語で使用できるその他の演算子をすべて理解してください-
上記のプログラムをコンパイルして実行すると、次の結果が生成されます-