1. Write a program that creates an optimized structure comprising the name of the region (maximum = 100 characters), carpet area (maximum = 10,000 sqft) and rate/sqft (maximum = Rs 20,000). Enter the...


1. Write a program that creates an optimized structure comprising the name of the region (maximum = 100 characters), carpet area (maximum = 10,000 sqft) and rate/sqft (maximum = Rs 20,000). Enter the details of two apartments, store the data of one using calloc and the other using realloc.


2. Write a program to create space for an array of 10 int elements using calloc. Assign a few elements with non-zero values input from the keyboard using EOF to terminate input. Compute the count of values by examining the memory block. Print the count and the entered values before resizing this memory block with realloc to free unused space. Will this program work with malloc instead of calloc?



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here