Monday, October 26, 2020

C++ Programming - Bubble Sort Function

    C++ is a very popular programming language. Bubble Sorting is a technic to sort data in array. In this code you can see, how to do Bubble Sort by using C++ code.  




#include<iostream>
using namespace std;


void sortArr(int Arr[], int c); //to declare the function
void printArr();
int *x; //declare the pointer variable
int main(){
int realArr[4]={4,2,3,1}; //array we need to sort
sortArr(realArr,4); //call the function
printArr(); //to print the sorted array

}
//function to sort array elements
void sortArr(int Arr[], int c){

for(int i=0; i<c-1; i++){
for(int j=0; j<c-1-i; j++){
if(Arr[j]>Arr[j+1]){
int temp = Arr[j];
Arr[j]=Arr[j+1];
Arr[j+1]=temp;
}
}
}
x = &Arr[0]; // store the address in pointer variable
}
//function for print sorted array values
void printArr(){
for(int i=0; i<4; i++){
cout<<*(x+i)<<" ";
}

}



    If you need to check this code without installing an IDE of C++, you can refer the below link and copy paste the code, Click Here


Thursday, October 8, 2020

Java Programming - 01 - How to Download & Install Java JDK 8 in Windows

     There are several steps, you should follow to install a Java Jdk version.


Step 01 - Click on this to visit the page and then, download the latest Java Jdk version.



Step 02 -   
01. Accept the License Agreement.
02. Download latest Java JDK for your version(32 or 64 bit) of Java for Windows.



Step 03 - Once the download is complete, run the exe for install JDK. Click Next



 

Step 04 - Select the PATH for Java installation and click next.




Step 05 - Once installation is complete click Close.





C++ Programming - Bubble Sort Function

    C++ is a very popular programming language. Bubble Sorting is a technic to sort data in array. In this code you can see, how to do Bubb...