Right Click to Search

Friday, August 13, 2024

Some Typical Verities of Comma Operator !!!


Verity 1 :
#include<stdio.h>
int main()
{
          int i;
          i = 1,2,3;
          printf("i:%d\n",i);
          return 0;
}
Output :
i:1

Verity 2 :
#include<stdio.h>
int main()
{
          int i;
          i = (1,2,3);
          printf("i:%d\n",i);
          return 0;
}
Output :
i:3

Verity 3 :
#include<stdio.h>
#include< conio.h>
void main()
{
clrscr();
printf("Computer","Programming");
getch();
}
Output :
Computer

Verity 4 :
#include<stdio.h>
#include< conio.h>
void main()
{
 int choice = 2 ;
 switch(choice)
 {
  case 1,2,1 :
        printf("\nAllas");
        break;
  case 1,3,2 :
        printf("\nBabo");
        break;
  case 4,5,3 :
        printf("\nHurray");
        break;
 }
}
Output :
Babo

Tags / Keywords : |

Stumble
Delicious
Technorati
Twitter
Facebook

0 Comments:

Post a Comment

Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email

 

Learn C Programming Copyright © 2010 LKart Theme is Designed by Lasantha, Free Blogger Templates