I need to get the screen thats located at the very bottom PL

I need to get the screen that\'s located at the very bottom. PLEASE help. Thank you

Solution

#include<stdio.h>
#include<stdlib.h>

struct dArray{
   int *mem;
   int effectiveSize;
   int maxSize;  
};

void ExpandArray(struct dArray *store){
   int i;
   printf(\"\ Expanding storage from size %d to %d\", store->maxSize, store->maxSize+1);
  
   //holding old memory
   int *temp = store->mem;
  
   store->maxSize += 1;
  
   //allocating new memory with more size
   store->mem = (int*) malloc(sizeof(int) * store->maxSize);
  
   //copying old data
   for(i=0;i<store->effectiveSize;i++){
       store->mem[i] = temp[i];
   }
  
   //freeing old memory
   free(temp);
}

void PlaceValue(int v, struct dArray *store){
  
   if(store->effectiveSize == store->maxSize){
       ExpandArray(store);  
   }  
  
   printf(\"\ Updating storage by value: %d\", v);  
   //inserting value
   store->mem[store->effectiveSize] = v;
   store->effectiveSize += 1;
}

void PrintArray(struct dArray *store){
   //printing values in storage
  
   int i;
   printf(\"\ Printing storage: \");
   for(i=0;i<store->effectiveSize;i++)
       printf(\"%d \", store->mem[i]);
}


int main(){
   int i;
   struct dArray store;
   store.maxSize = 5; //default size
   store.effectiveSize = 0;
   store.mem = (int*) malloc(sizeof(int) * store.maxSize); //allocating memory
  
   for(i=30;i<40;i++)
       PlaceValue(i, &store);
  
   PrintArray(&store);
  
return 0;
}

I need to get the screen that\'s located at the very bottom. PLEASE help. Thank youSolution#include<stdio.h> #include<stdlib.h> struct dArray{ int *
I need to get the screen that\'s located at the very bottom. PLEASE help. Thank youSolution#include<stdio.h> #include<stdlib.h> struct dArray{ int *

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site