Answer:
#include <iostream>
#include<bits/stdc++.h>
using namespace std;
bool sorter(string a, string b)
{
return a<b;
}
int main(){
string wordList[3];
string word;
for (int i = 0; i < 3; i++){
cout<< "Enter word: ";
cin>> word;
wordList[i] = word;
}
sort(wordList, wordList+3, sorter);
for (int i = 0; i < 3; i++){
cout<< wordList[i]<< "\n";
}
}
Explanation:
The C++ source code prompts the user for string words that are appended to the wordList array. The array is sorted with the sort() function from the C++ bits library. The finally for loop statement prints out the items in the array.
Highlight the text you want to change
Answer:
Step 1: Wrap the image in a div element. Step 2: Set the display property to "flex," which tells the browser that the div is the parent container and the image is a flex item. Step 3: Set the justify-content property to "right." Step 4: Set the width of the image to a fixed length value
Explanation:
Answer:
The lossy compression method is also known as irreversible compression and is beneficial if the quality of the data is not your priority. It slightly degrades the quality of the file or data but is convenient when one wants to send or store the data. This type of data compression is used for organic data like audio signals and images. The algorithm use in Lossy compression include: Transform coding, DCT, DWT, fractal compression, RSSMS.
The Lossless compression method is also known as reversible compression and is capable of reconstituting the original form of the data. The quality of the data is not compromised. This technique allows a file to restore its original form. Lossless compression can be applied to any file format can improve the performance of the compression ratio. The algorithm use in Lossless compression include: RLW, LZW, Arithmetic encoding, Huffman encoding, Shannon Fano coding.
Advantage of Lossy compression: Lossy compression can achieve a high level of data compression when compared to lossless compression.
Advantage of Lossless compression: Lossless compression doesn’t degrade the quality of data during compression
Disadvantage of Lossy compression: Lossy compression degrades the quality of the data during compression
Disadvantage of Lossless compression: Lossless compression has less data holding capacity when compared to lossy method
Example of type of data for Lossless compression: Text
Example of type of data for Lossy compression: Audio
Explanation:
Explanation:
using random assignment keeps the study from becoming biased or untestable. it gives the results validity.