COS1511 assignment 3 2023 EXPECTED QUESTIONS AND ANSWERS
14 views 1 purchase
Course
Introduction to Programming I (COS1511)
Institution
University Of South Africa (Unisa)
This document contains:
COS1511 assignment 3 2023 EXPECTED QUESTIONS AND ANSWERS
90% is the score obtainable using this document, if you have any enquiries, message us directly.
COS1511-23-Y Welcome to COS1511 Module Site Assessment 3
QUIZ
Started on Saturday, 19 August 2023, 3:37 PM
State Finished
Completed on Saturday, 9 September 2023, 5:52 PM
Time taken 21 days 2 hours
Marks 54.00/60.00
Grade 90.00 out of 100.00
Question 1
Correct
Mark 1.00 out of 1.00
What is the output of the following program?
#include <iostream>
using namespace std;
void X(int A, int &B)
{
A = A + B;
B = A - B;
A = A - B;
}
int main()
{
int a = 4, b = 18;
X(a,b);
cout << a << ", " << b;
return 0;
}
a. 4, 4
b. 18, 4
c. 18, 18
d. 4, 18
Your answer is correct.
The correct answer is:
4, 4
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
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
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 these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller primenovice. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $9.15. You're not tied to anything after your purchase.