Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- #include<stdlib.h>
- struct shop
- {
- char name[30];
- int qty;
- float price;
- };
- struct shop simprint(shop s);
- void main()
- {
- struct shop item;
- printf("enter name=");
- scanf("%s",item.name);
- fflush(stdin);
- printf("enter qty=");
- scanf("%d",&item.qty);
- printf("enter price=");
- scanf("%f",&item.price);
- item=simprint(item);
- printf("name=%s\n",item.name);
- printf("qty=%d\n",item.qty);
- printf("price=%f",item.price);
- system("pause");
- }
- struct shop simprint(shop s)
- {
- s.qty=s.qty+10;
- s.price=s.price+10;
- return s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement