#include<stdio.h> #include<conio.h> struct detail { char name[10]; int page; }; void main() { int x; struct detail m1={"anbu",10}; struct detail m2={"kan",20}; x=((m1.name==m2.name)&&(m1.page==m2.page))?1:0; if(x==1) { printf("correct"); } else { printf("bad"); } getch(); } |
Output: bad |
0 comments:
Post a Comment