100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4,6 TrustPilot
logo-home
Exam (elaborations)

Cos1511

Rating
-
Sold
-
Pages
8
Grade
A
Uploaded on
26-01-2023
Written in
2022/2023

The Cos1511 exam will test you on the basic structures within the C++ Programming Language , It covers the following fundamentals ; 1) Variables in C++ 2) Data Types in C++ (This includes strings for text,double for 2 decimal point numbers, float for 1 decimal point numbers, integer for whole numbers) 3) Arrays in C++ 4)Functions in C++ 5)input/output stream in C++ 6)Structs in C++ 7) Loops ( For, While , Do ...While Loops) in C++ 8)Conditions in C++ A brief overview of prescribed programming language in cos1511: C++ is a leading ,versatile , robust multiparadigm programming language encompassing mainly Object Oriented Programming,functional programming used for ...Guess ... The call of duty game you play was built in c++ (c++ is a leading game development language since it operates in low level compared to popular Python, Javascript languages which are much slower than C++) Operating Systems such as windows Web Browsers and many more So what you are waiting for buy now and recieve a sample code to get started in c ++ For more content Contact me on my email :

Show more Read less









Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
January 26, 2023
Number of pages
8
Written in
2022/2023
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

Jan/Feb 2023



70 Marks




This paper consists of 8 pages out of 70 marks


INSTRUCTIONS:

1. Answer all the questions on a Word document/by hand and convert to PDF.
2. Number your answers and label your rough work clearly.
4. Marks are awarded for part of an answer, so do whatever you are able to in each question.




ALL THE BEST




[TURN OVER]

, 2

Choose the correct option and write only the number

Question 1 [20]
1.What is the output of the following code fragment? (2)

int x = 0;
while( x < 8)
cout << x << " ";
x ++;
cout << x << endl;

1. 0
2. infinite loop
3. 1 2 3 4 5 6 7 8
4. 0 1 2 3 4 5 6 7 8

2.What is the value of x after the following statements? (2)

int x, y, z; y = 10;
z = 3;
x = y * z - 3;

1. 0
2. 3
3. 10
4. 27

3.What is the value of x after the following statements? (2)

int x;
x = x + 15;

1. 0
2. 14
3. 15
4. not defined

4.What is the output of the following code? (2)

cout << "Where is the \\" << endl;

1. Where is the \
2.Where is the
3.Nothing, it is a syntax error
4.Where is the \ endl

5.What is the value of xafter the following statements? (2)

int x;
x = 19 % 5;

1. 4.0
2. 4
3. 3.8
4. 8

6.Given the following code fragment and the input value of 5, what output is generated? (2)
[TURN OVER]
float tax; float total;

cout << "Enter the cost of the item\n"; cin >> total;
R77,00
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
shivamnaik
5,0
(1)

Get to know the seller

Seller avatar
shivamnaik University of South Africa (Unisa)
View profile
Follow You need to be logged in order to follow users or courses
Sold
6
Member since
3 year
Number of followers
2
Documents
15
Last sold
5 months ago
The Innovaters Academy, Where winning never ends

We cater for all your academic needs from study guides to exam past papers pertaining to the school of computing at the University of South Africa Moreover we also provide the best advice to all future Bill Gates , Elon Musks and Jeff Bezos`es out there For more information on all your academic needs ,please contact the following number; 071 116 2030 Mr SS Naik

5,0

1 reviews

5
1
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions