100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
cos assignment 5 questions R150,00   Add to cart

Exam (elaborations)

cos assignment 5 questions

3 reviews
 351 views  14 purchases

this document contains questions for assignment 5 cos

Preview 1 out of 9  pages

  • October 12, 2023
  • 9
  • 2023/2024
  • Exam (elaborations)
  • Only questions
All documents for this subject (14)

3  reviews

review-writer-avatar

By: phumelelemjaja • 1 year ago

review-writer-avatar

By: mtheembeni • 1 year ago

review-writer-avatar

By: tandontombela • 1 year ago

avatar-seller
elenaprowriter
Assessment 5

QUIZ
Cos2614 assignment 05
2023




Question 1
Not yet answered

Marked out of 2.00




Consider the following code:
QString processString(QString aString) { QStringList result;

QStringList stringParts = aString.split(" ");

for (int i=stringParts.size()-1; i>=0; i--) {

result.append(stringParts.at(i));
}
return result.join(" ");

}



int main(int argc, char* argv[]) { QApplication app(argc, argv);
QString inputString = QInputDialog::getText(0, "Input", "Enter a string: ");

QMessageBox::information(0, "Results", processString(inputString));

return 0;

}

What happens if the user clicks the OK button in the QInputDialog without
entering any input?




a. An empty (no output string) QMessageBox will be displayed.



b. Run time error.

c. An error message will be displayed in a QMessageBox.

d. Nothing will happen.

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying this summary from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller elenaprowriter. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy this summary for R150,00. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

67474 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 14 years now

Start selling
R150,00  14x  sold
  • (3)
  Buy now