1. You have an array of 3 values: 'Honda','Accord','7.9 km/liter'
The name of the array is: gift
Assign each of the entries in the array to separate
variables.
Use these variables to create a new string: "Make: Honda Model:
Accord Fuel Efficiency: 7.9 km/liter"
2. Describe the purpose of the following directories:
3. Explain the difference between a filter and a providers. Give an example of each and explain what it does.
Ques 1
1. You have an array of 3 values: 'Honda','Accord','7.9 km/liter'
The name of the array is: gift
Assign each of the entries in the array to separate
variables.
Use these variables to create a new string: "Make: Honda Model:
Accord Fuel Efficiency: 7.9 km/liter"
ANS
#include<iostream>
#include<string>
using namespace std;
int main(){
string gift[3]{"Honda","Accord","7.9 km/liter"}; //array named gift
having three values
// assigning each value to seperate variables
string a = gift[0];
string b = gift[1];
string c = gift[2];
//using the variable to create a string
cout <<"'Make: " << a << " Model: " << b
<< " Fuel Efficiency: "<< c << endl;
return 0;
}
Ques 2
Describe the purpose of the following directories:
Ques 3 Sorry but I am unable to understand the question, it will be helpful if you give more information regarding the topic...
Get Answers For Free
Most questions answered within 1 hours.