D

@Dheerendra

29march)class-03.c

C
3 years ago
//Insert an element at a particular position in an array #include <stdio.h> int main() { int array[100], position, c, n, value; printf("Enter number of elements in array:\n"); scanf("%d", &n); printf("Enter %d elements:\n", n); for (c = 0; c < n; c+

29march)class-02.c

C
3 years ago
// deleting a value of an array #include<stdio.h> int main(){ int n,i,p; printf("Enter length of array : "); scanf("%d",&n); int a[n]; printf("\nEnter elements of the array : "); for(i=0;i<n;i++){

29march)class-01.c

C
3 years ago
// Updating a value of an array #include<stdio.h> int main(){ int n,i,p,v; printf("Enter length of array : "); scanf("%d",&n); int a[n]; printf("\nEnter elements of the array : ");

27march)class-05.c

C
3 years ago
//By mam //Sort an array using Bubble Sort #include <stdio.h> int main() { int a[100]; int hold,i,j,n; printf("Enter value of n:"); scanf("%d",&n); printf("\nEnter elements:");

27march)class-04.c

C
3 years ago
//binary Search by mam //Find an element in an array #include<stdio.h> int main() { int a[50],n,loc=-1, key, beg,last,mid,i; printf("Enter number of array elements : "); scanf("%d",&n); printf("\nEnter array elements : ");

27march)class-03.c

C
3 years ago
//binary search by self #include <stdio.h> int main() { int a[50],i,key,mid; printf("\nEnter size of array (n) : "); scanf("%d",&n); printf("\nEnter the elements:"); for(i=0;i<n;i++)

27march)class-02.c

C
3 years ago
//linear search by mam #include <stdio.h> int main() { int a[50]; int i, loc = -1, key,n; printf("\nEnter size of array (n) : "); scanf("%d",&n); printf("\nEnter the elements:");

27march)class-01.c

C
3 years ago
//linear search by self #include <stdio.h> int main() { int a[50],i,n,key,loc=-1; printf("Enter size of array : "); scanf("%d ",&n); for(i=0;i<n;i++){ scanf("%d ",&a[i]); }

Hackerrank-week-06-02.c

C
3 years ago
// for a given input print sum of its previous three terms #include<stdio.h> int sum(int a); int main(){ int n; scanf("%d",&n); printf("n : %d\n",n); sum(n);

Hackerrank-week-06-01.c

C
3 years ago
// Write a function int max_of_four(int a, int b, int c, int d) // which reads four arguments and returns the greatest of them. #include<stdio.h> #include<string.h> int max_of_four(int a,int b, int c,int d); int main(){ int a,b,c,d; scanf("

22march)Array-class-06.c

C
3 years ago
//Find the min and max elements in an array #include<stdio.h> int main() { int n,i,max,min; printf("Enter number of elements:"); scanf("%d",&n); int a[n]; for(i=0;i<n;i++) {

22march)Array-class-05.c

C
3 years ago
//Max of an array #include <stdio.h> void reference(int[], int); int main(){ int arr[100],n; int i; printf("Enter length of array : "); scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&arr[i]);

22march)Array-class-04.c

C
3 years ago
//max of an array #include <stdio.h> int main() { int n,i,max; printf("Enter size of array : \n"); scanf("%d",&n); int a[n]; printf("Entered elements of array : "); for(i=0;i<n;i++){

22march)Array-class-03.c

C
3 years ago
//Initialize an array and print elements and their sum #include<stdio.h> int main() { int n,sum=0; printf("Enter number of elements:"); scanf("%d",&n); int a[n],i; printf("\nEnter array elements:"); for(i=0;i<n;i++)

22march)Array-class-2.c

C
3 years ago
//Initialize an array and print it #include<stdio.h> int main() { int a[5]={10,20,30,40,50},i,n; printf("Entered array elements are:"); for(i=0;i<5;i++) { printf("\n%d",a[i]);

22march)Array-class-01.c

C
3 years ago
//Initialize an array during run time and print it #include <stdio.h> int main() { int a[100],i,n; printf("Enter number of elements : \n"); scanf("%d",&n); printf("Enter array of Elements : \n"); for(i=0;i<n;i++){ scanf(

19march)struct-10.c

C
3 years ago
//Make a structure to store Bank account information of a customer of // ABC bank .Also, make an alias of it. #include <stdio.h> typedef struct BankAccount{ //initialising structure along with alias int accountNo; char name[100]; } acc ; i

19march)struct-09-complex.c

C
3 years ago
// Create a structure to store complex numbers (use arrow operator) #include <stdio.h> struct complex { int real; int img; }; int main(){ struct complex number1={5,8};

18march)struct-08.c

C
3 years ago
// create a structure to store vectors.Then make a function to return // sum of two vectors #include <stdio.h> struct vector { int x; int y; }; //remember to put ; after ending of struct structure void calcSum(struct vector v1,struct vector

18march)struct-07.c

C
3 years ago
// using structure enter address(house no, block, city, state) of 5 people #include<stdio.h> #include<string.h> struct address{ int house_no; int block; char city[100]; char state[100]; };