search
Login

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

0 votes
341 views
asked Geek 15.3k points 16 41 63

1 Answer

0 votes

#include<stdio.h>

#include<conio.h>

#include<string.h>

void main()

{

struct disk

{

char co[15];

float type;

int price;

};

Struct disk d1={“SONY”,1.44,20};

Struct disk d2,d3;

strcpy(d2.co,d1.co);

d2.type=d1.type;

d2.price=d1.price;

d3=d2;

clrscr();

printf(“\n %s %g %d ”, d1.co.d1.type, d1.price);

printf(“\n %s %g %d ”, d2.co.d2.type, d2.price);

printf(“\n %s %g %d ”, d3.co.d3.type, d3.price);

getch();

}

Output:

SONY 1.44 20

SONY 1.44 20

SONY 1.44 20 

answered Guru 39.1k points 10 21 33

Related questions

0 votes
1 answer 35 views
0 votes
1 answer 505 views
0 votes
1 answer 530 views
0 votes
1 answer 36 views
36 views
asked keem Expert 13.2k points 27 40 59
...