#include <stdio.h>
struct inventory
{
char name[20];
int number;
};
struct inventory function();
int main(void)
{
struct inventory items;
items=function();
printf("\n%s\t",(items
).
name); printf(" %d\t",(items
).
number); }
struct inventory function()
{
struct inventory items;
printf(" enter the item name\n "); scanf(" %s ",&items.
name ); printf(" enter the number of items\n "); scanf("%d",&items.
number ); return items;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgpzdHJ1Y3QgaW52ZW50b3J5CnsKICAgIGNoYXIgbmFtZVsyMF07CiAgICBpbnQgbnVtYmVyOwp9OwoKc3RydWN0IGludmVudG9yeSBmdW5jdGlvbigpOwoKaW50IG1haW4odm9pZCkKewogICAgc3RydWN0IGludmVudG9yeSBpdGVtczsKICAgIGl0ZW1zPWZ1bmN0aW9uKCk7CiAgICBwcmludGYoIlxuYW0gaW4gbWFpblxuIik7CiAgICBwcmludGYoIlxuJXNcdCIsKGl0ZW1zKS5uYW1lKTsKICAgIHByaW50ZigiICVkXHQiLChpdGVtcykubnVtYmVyKTsgCn0KCnN0cnVjdCBpbnZlbnRvcnkgZnVuY3Rpb24oKQp7CiAgICBzdHJ1Y3QgaW52ZW50b3J5IGl0ZW1zOwogICAgcHJpbnRmKCIgZW50ZXIgdGhlIGl0ZW0gbmFtZVxuICIpOwogICAgc2NhbmYoIiAlcyAiLCZpdGVtcy5uYW1lICk7CiAgICBwcmludGYoIiBlbnRlciB0aGUgbnVtYmVyIG9mIGl0ZW1zXG4gIik7CiAgICBzY2FuZigiJWQiLCZpdGVtcy5udW1iZXIgKTsKICAgIHJldHVybiBpdGVtczsKfQ==