Created: 2023-01-11 11:23
Status: #concept
Subject: Programming
Tags: C Rvalue Operators
Expression
- they can also be returned from Function calls.
C
- In C, we have to be vary of how expressions are evaluated when we intend to mix C Data Type in the expression.
- We can declare a Compound Literal for C Arrays or Strings, which are evaluated during Compiling time.
// the sum of a Compound Literal array with the size of 5 is assigned to the variable total
int total = sum_array( (int []){3, 0, 1, 4, 2}, 5 );
References
- C Programming, A Modern Approach, 2nd Edition, Chapter 9.3