Home

A program to explain comma operator

C Programming Language 012

The following code shows how to write a program to explain comma operator

Program

#include <stdio.h>

void main()
{
    int a, b, value;

    value = (a = 10, b = 5, a + b);
    printf("value = %d \n", value);
}

Result

value = 15


Last Updated on

Next Post: GraphProtocol: TS2322 null assignment in Subgraph →

Comments