Posts

Showing posts from January, 2024

SOFTWARE

Image
 01 Winrar -64-bit version-623 Download link click- 02 chrome setup Download link click- 03 Turbo-c Download link click-  Dev  C , C ++ 04 typing master 11 Download link click- 05 java software 64-bit version-8 Download link click-               64-bit                                        32-bit        06 Adobe-version-10 Download link click- 07 sublime text -64-version-4 Download link click- 08 python -64-bit-version-3.8.6 -32-bit-version-3.8.10 Download link click- 64-bit                                                  32-bit     09 MS-office 2007 Download link click-    Download link click-wps-office-2020    10 xampp ...

DS-Record-mca-01)Write a program to sort a list using bubble sort and then apply binary search.

Image
1)AIM:- Write a program to sort a list using bubble sort and then apply  binary search. code:-  #include <stdio.h> #include <conio.h> void main() { int array[10]; int i, j, num, temp, keynum; int low, mid, high; clrscr(); printf("Enter the size of the array \n"); scanf("%d", &num); printf("Enter the elements one by one \n"); for (i = 0; i < num; i++) { scanf("%d", &array[i]); } printf("Input array elements \n"); for (i = 0; i < num; i++) { printf("%d\n", array[i]); } /* Bubble sorting begins */ for (i = 0; i < num; i++) { for (j = 0; j < (num - i - 1); j++) { if (array[j] > array[j + 1]) { temp = array[j]; array[j] = array[j + 1]; array[j + 1] = temp; } } } printf("Sorted array is...\n"); for (i = 0; i < num; i++) { printf("%d\n", array[i]); } printf(...

ds programs

  1)Write a program to sort a list using bubble sort and then apply binary search.   #include <stdio.h>   void main() {     int array[10];     int i, j, num, temp, keynum;     int low, mid, high;     printf("Enter the size of the array \n");     scanf("%d", &num);     printf("Enter the elements one by one \n");     for (i = 0; i < num; i++)     {         scanf("%d", &array[i]);     }     printf("Input array elements \n");     for (i = 0; i < num; i++)     {         printf("%d\n", array[i]);     }     /*   Bubble sorting begins */     for (i = 0; i < num; i++)     {      ...