PPS LAB

Program to delete an element from the array and display the array after deleting element

Program #include <stdio.h> int main() { printf(“**************************************************************”); printf(“\n**************************************************************”); printf(“\n** WAP for Deletion from an array **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n**************************************************************”); printf(“\n**************************************************************\n”); int n,i,a[5],pos; printf(“Enter no. of elements in the array\n”); scanf(“%d”,&n); printf(“enter array elements”); for(i=0;i<n;i++) scanf(“%d”,&a[i]); printf(“\nThe array elements before deletion are\n”); for(i=0; i<n; …

Program to delete an element from the array and display the array after deleting element Read More »

Program to add a new element in the array and display the array after adding element

Program #include <stdio.h> int main() { printf(“**************************************************************”); printf(“\n**************************************************************”); printf(“\n** WAP for insertion into an array **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n**************************************************************”); printf(“\n**************************************************************\n”); int n,i,a[5],no,pos; printf(“Enter no. of elements in the array\n”); scanf(“%d”,&n); printf(“enter array elements”); for(i=0;i<n;i++) scanf(“%d”,&a[i]); printf(“\nThe array elements before insertion are\n”); for(i=0; i<n; …

Program to add a new element in the array and display the array after adding element Read More »

Program to find maximum of elements of a 2-D array

Program (Without Using Function) #include <stdio.h> int main() { printf(“**************************************************************”); printf(“\n**************************************************************”); printf(“\n** WAP to find maximum element from a 2-D array **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n**************************************************************”); printf(“\n**************************************************************\n”); int r, c, i, j, a[10][10], max; printf(“Enter no. of rows and columns in the array\n”); scanf(“%d%d”, …

Program to find maximum of elements of a 2-D array Read More »

Program to find minimum of elements of a 2-D array

Program (Without Using Function) #include <stdio.h> int main() { printf(“**************************************************************”); printf(“\n**************************************************************”); printf(“\n** WAP to find minimum element from a 2-D array **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n**************************************************************”); printf(“\n**************************************************************\n”); int r, c, i, j, a[10][10], min; printf(“Enter no. of rows and columns in the array\n”); scanf(“%d%d”, …

Program to find minimum of elements of a 2-D array Read More »

Program to swap two numbers with/without using temporary variable

Program #include <stdio.h> int main() { printf(“************************************************************”); printf(“\n************************************************************”); printf(“\n**WAP to Swap two no with/without using temporary variable**”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n************************************************************”); printf(“\n************************************************************\n”); int a,b,temp; printf(“\nEnter two numbers : “); scanf(“%d%d”,&a,&b); printf(“\nNUmbers before Swapping are a= %d and b=%d\n”,a,b); printf(“\nUsing temporary variable”); temp=a; a=b; b=temp; …

Program to swap two numbers with/without using temporary variable Read More »

WAP to explain Call by Reference Method of Function Call

Program #include <stdio.h> void change(int *a, int *b) { int t=*a; *a = *b; *b = t; printf(“\nIn the Function Values are changed”); printf(“\na= %d and b= %d”, *a, *b); } int main() { printf(“***************************************************************”); printf(“\n***************************************************************”); printf(“\n** WAP to explain Call by Reference Method **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); …

WAP to explain Call by Reference Method of Function Call Read More »

Program to find maximum of elements of an array

Program(Without Using Function) #include <stdio.h> int main() { printf(“**************************************************************”); printf(“\n**************************************************************”); printf(“\n** WAP to find maximum element from an array **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n**************************************************************”); printf(“\n**************************************************************\n”); int n, i, a[10], max; printf(“Enter no. of elements in the array\n”); scanf(“%d”, &n); printf(“enter array elements”); for (i …

Program to find maximum of elements of an array Read More »

Program to find minimum of elements of an array

Program (Without Using Function) #include <stdio.h> int main() { printf(“**************************************************************”); printf(“\n**************************************************************”); printf(“\n** WAP to find minimum element from an array **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n**************************************************************”); printf(“\n**************************************************************\n”); int n, i, a[10], min; printf(“Enter no. of elements in the array\n”); scanf(“%d”, &n); printf(“enter array elements”); for …

Program to find minimum of elements of an array Read More »

error: You can only copy the programs code and output from this website. You are not allowed to copy anything else.