top of page

Array Deletion At End



#include <stdio.h>


void main() {

int a[100],i;

int eb,size,pos;

printf("\nEnter the size of array : ");

scanf("%d",&size);

for(i=0;i<size;i++)

{

printf("\nEnter element : ");

scanf("%d",&a[i]);

}

printf("\n----Array----\n");

for(i=0;i<size;i++)

{

printf(" %d",a[i]);

}

printf("\nSize : %d",size);

size--;

printf("\n----Latest Array----\n");

for(i=0;i<size;i++)

{

printf(" %d", a[i]);

}

printf("\n Size : %d", size);

}

1 view0 comments

Recent Posts

See All

Stack Using Queue

A stack can be implemented using two queues in C. The basic idea is to use one queue for enqueue operations and another for dequeue operations. When an element is pushed onto the stack, it is enqueued

bottom of page