To declare multiple variables of identical types, utilize a list separated by commas.
int x = 5, y = 6, z = 50; printf(“%d”, x + y + z); |
You can also assign identical values to multiple variables of the same type.
int x, y, z; x = y = z = 50; printf(“%d”, x + y + z); |