> copying structures in c ~ Online tutorial

copying structures in c






#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

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: