From the course: C Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Exploring unary operators

Exploring unary operators - C Tutorial

From the course: C Essential Training

Start my 1-month free trial

Exploring unary operators

- [Instructor] C language Unary Operators affect only one variable. The name Unary comes from the Latin onus one. And here's the full list of operators, including the size of operator, which is both an operator and the C-language keyword, it deserves a bit of exploration size of works on a variable array or chunk of memory. It returns a size_t value, which is an unsigned positive integer representing the number of bytes of memory the item occupies. To use the size_t type death. You must include the stdio.h header file in your code. This operator is used most often when allocating memory or dealing with pointers. In this code, six variables are declared the four standard character, integer, float and double. I'm also added a string or character array and a buffer capable of storing 10 integers. For each of these items a printf statement, uses the size of operator, to output how many bytes each item occupies in…

Contents