The difference is that system on a desk top preforms all the basic tasks like file management, memory management handling input and output and controlling peripheral devices such ad disk and printers where as some smart phone work on specific hardware
Answer:
/Question.h
#include<iostream>
#include<string>
using namespace std;
class Question
{
private:
string question;
string answer[4];
unsigned int correctAnswer;
public:
Question(string ques,string *ans,unsigned int x)
{
int i;
question.assign(ques);
for(i=0;i<4;i++)
{
answer[i]=ans[i];
}
correctAnswer=x;
}
~Question()
{
}
string getQuestion()
{
return question;
}
unsigned int getCorrectAnswer()
{
return correctAnswer;
}
string getAnswer1()
{
return answer[0];
}string getAnswer2()
{
return answer[1];
}
string getAnswer3()
{
return answer[2];
}string getAnswer4()
{
return answer[3];
}
int getNoOfPossibleAnswers()
{
return 4;
}
};
Explanation:
The Question class represents one question and the possible answers for that question.
The Question class contains the question text and the 4 possible answers. It also contains the answer number of the correct answer.
The answer number is an unsigned int in the range of 1 to 4.Your Question class needs to have one or more constructors and one destructor.
It needs a member function that returns the question text. It also needs member functions that return the answer text for a specific answer
(1 through 4). The class also needs a member function that returns the number of possible answers for this question. While this is 4 today,
it could change in future versions of the class. Finally there needs to be a member function that returns the answer number of the correct answer
(a value of 1 through 4).Do not make the data members public. You can have public and private member functions as needed.
Answer:
i guess to delete words and to erase stuffs from the computer
Explanation:
hope it helps : )
<u>Answer:</u>
<em>int fNumber,scndNumber = -1, </em>
<em>dup = 0;
</em>
<em>do {
</em>
<em>cin >> fNumber;
</em>
<em>if ( scndNumber == -1) {
</em>
<em>scndNumber = fNumber;
</em>
<em>}
</em>
<em>else {
</em>
<em>if ( scndNumber == fNumber )
</em>
<em>duplicates++;
</em>
<em>else
</em>
<em>scndNumber = fNumber;
</em>
<em>}
</em>
<em>} while(fNumber > 0 ); </em>
<em>cout << dup;
</em>
<u>Explanation:</u>
Here three variables are declared to hold the first number which is used obtain all the inputs given by the user, second number to hold the value of <em>last encountered number and “dup” variable to count the number of duplicate values.</em>
<em>“Do-while”</em> loop help us to get the input check whether it is same as previous input if yes then it <em>adds to the duplicate</em> value otherwise the new previous value if stored.