C Program : Use of Comma Operator

 #include <stdio.h>

int main() { int x, y, z; // Assign values to variables using the comma operator x = 5, y = 10, z = x + y; printf("Value of x: %d\n", x); printf("Value of y: %d\n", y); printf("Value of z: %d\n", z); // Use the comma operator within a for loop for (int i = 1, j = 10; i <= 5; i++, j--) { printf("i: %d, j: %d\n", i, j); } return 0; }

Comments

Popular posts from this blog

Video Formats

Where video editing is used

File saving and folder management