• + 0 comments

    JUST ONE LINE ANSWER AFTER ALLOCATING THE MEMORY FOR BOTH ARRAYS;int main() { total_number_of_books=(int*)calloc(total_number_of_shelves,sizeof(int)); total_number_of_pages=(int**)calloc(total_number_of_shelves,sizeof(int*)); for(int i=0;i total_number_of_pages[i]=(int*)calloc(1100,sizeof(int)); } while (total_number_of_queries--) {
    int type_of_query; scanf("%d", &type_of_query);
    if (type_of_query == 1) {
    int x, y; scanf("%d %d", &x, &y);

    * ((totalnumberofpages+x)+((totalnumberofbooks+x))++)=y; *