Developer community
0 votes
1k views
asked by Geek (15.3k points) 18 43 68 | 1k views

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 by Guru (39.1k points) 10 22 37

Related questions

0 votes
1 answer
asked by keem Expert (13.2k points) 28 43 62 | 34 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked by keem Expert (13.2k points) 28 43 62 | 40 views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

Categories


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

3.8k questions

4k answers

117 comments

10.7k users

3,754 questions
4,046 answers
117 comments
10,709 users