Answer:
static int [] bubbleSort(int[] arr) {
int n = arr.length;
int temp = 0;
for(int i=0; i < n; i++){
for(int j=1; j < (n-i); j++){
if(arr[j-1] > arr[j]){
temp = arr[j-1];
arr[j-1] = arr[j];
arr[j] = temp;
}
}
}
return arr;
}
Explanation:
Above function is written in java language in which it takes integer array then sorts it using bubble sort and return back the array. The function has return type int[] which is necessary for returning array of type integer. The variable n contains the size of array which is calculated through array's length method which is built in. Above function sorts array in descending order if you want to sort it in ascending order just change the condition of in if branch from <em>"</em><em>if(</em><em>arr[j-1] > arr[j]</em><em>)</em><em>"</em> to <em>"</em><em>if(</em><em>arr[j-1] < arr[j]</em><em>)</em><em>"</em> means replace > sign with < sign .
Answer:
a) 255
b) 61602
c)
d)
Explanation:
You need to understand the decimal equivalent of hexadecimal numbers, <em>from 0 to 9 numbers are represented the same way, from 10 to 15 we use the alphabet, meaning 10 equals A in hexadecimal base, 11-B, 12-C, 13-D, 14-E, and 15-F.</em>
For your first exercise you'll enumerate the number's positions fromright to lef begining with 0:
a. F F
position 1 0
Now you'll multiply your hexadecimal number (using the decimal equivalent for your letters) for the base (16) elevated to the number of the position:
Finally, you'll add your results:
240+15=255
FF=255
b. F 0 A 2
position 3 2 1 0
F0A2=61602
c. F 1 0 0
position 3 2 1 0
0F100=61696
d. 1 0 0
position 2 1 0
100=256
I hope you find this information useful! Good luck!
Answer:
Digital Convergence
Explanation:
The term digital convergence refers to the use of a single unifying device that handles media, Internet, entertainment, and telephone needs. Digital convergence refers to the convergence of digital tools such as computers, phones, watches, and many other being combined and ready to use in one single device. In this modern society, the best example of digital convergence would have to be the smart phone. The smart phone contains hundreds of functions from other devices, all in one. Just with like every other great concept, digital convergence has good impacts as well as bad impacts in modern society. Positive impacts include, facilitates access to different funstions, helpful in cases of emergeny, helps save money as instead of buying many different devices, and facilitates mobility as there is only one device. Negative impacts include, if there is damage done to the device in an emergency, then it would imply more than one function being lost.
i'm sorry i do not know the answer to the question
Answer: False
Explanation: Even though you can remember it is not really good because some hackers can track you passwords through those websites and could hack your account.