satellite03
IS-IT--Management
Code:
#include<stdio.h>
typedef struct book
{ int page;
char author[20];
float cost;
};
int main()
{
book b1(100,abcd,20.78);
func(b1);
printf("%d %d %d", b1.page,b1.author,b1.cost);
}
func(book c )
{ c.page = 120;
c.author=efgh;
c.cost = 34.76;
}
hi this is a demo code . i wanted to implement structure....i am getting compilation error...where is the mistake ???
does structure are global variable???
i am also interested to send this structure by address and want to change the fields...how can i do that??
thanks