You really need to indent your code properly. For example:
Code:
/* Enthusiastic
Pessimism
desensitize
uniqueness
*/
#include <stdio.h>
#include <string.h>
struct Books {
char title[50];
char author[50];
char subject[100];
int book_id;
};
struct Books printhello();
int outputboo(struct Books boo);
int main() {
printhello();
int outputboo();
}
int outputboo(struct Books boo) {
printf(" here is your value of the function of the STRUCT :%i",&boo.book_id );
}
struct Books printhello() {
struct Books boo;
printf("Enter your book # here please :");
scanf("%i", &boo.book_id);
printf("your boo book_id is : %i\n\n\n\n\n\n\n\n\n\n", boo.book_id);
;
}
As for your problem, I suggest the use of a pointer, e.g.,
Code:
void print_book(const struct Books *book) {
printf(" here is your value of the function of the STRUCT :%i", book->book_id);
}
Now you can call it:
Code:
struct Books book;
book.book_id = 123;
print_book(&book);