C Language

May 20, 2023

How to use interchange comma operator in c language

program to use interchange comma operator in c language


 #include<stdio.h>
int main()
{
    int a=8,b=7,temp;
    printf("a=%d, b=%d\n",a,b);
    temp=a,a=b,b=temp;
    printf("a=%d, b=%d\n",a,b);
    return 0;
}

output


a=8, b=7
a=7, b=8

by : Ajaj Khan

Quick Summary:

In this program the value of a and b is changing
A’s value in B and B’s value in A