Monday, 9 September 2013

COMA OPERATER IN C:IMPORTANT TIPS

/*coma operater works like and in english i.e the value of k would be last expression inthe coma separated expressions
>>those expressiions are evaluated from left to right
*/

#include<stdio.h>
#include<conio.h>

int main()
{
    int x=1;
    int k=0;
   
    k=(x+=1,x+=5);
   
    printf("k=%d",k);
   
    getch();
    return 0;
}


No comments:

Post a Comment