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

C++

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
26-10-2024
Written in
2024/2025

Exam of 5 pages for the course C++ at C++ (C++)

Institution
C++
Module
C++









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

Written for

Institution
C++
Module
C++

Document information

Uploaded on
October 26, 2024
Number of pages
5
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

C++ GRADE A QUESTION WITH ANSWER

In a C++ program, two slash marks (//) indicate - (correct answer)The beginning of a
comment



Every complete C++ Program must have a _____ - (correct answer)Function named
main



For every opening brace in a C++ program, there must be a - (correct answer)Closing
Brace


A statement that starts with a # is called a - (correct answer)Preprocessor directive



This is used to mark the end of a complete C++ programming statement. - (correct
answer)Semicolon



What will the following code display?


cout << "Four\n" << "score\n";

cout << "and" << "\nseven";

cout << "\nyears" << " ago" << end; - (correct answer)Four
score

and

seven

years ago



What will the following code display?

, cout << "Four" << " score" << end;

cout << "and" << " seven" << end;

cout << "years" << " ago" << end; - (correct answer)Fourscore

andseven

yearsago



The ______ is/are used to display information on the computer's screen. - (correct
answer)Cout object


____________ must be included in any program that uses the cout object. - (correct
answer)The header file iostream



Including the following namespace will allow you simplify you code. - (correct
answer)std



To output multiple lines of text to the user, you must use more than one cout statement.
- (correct answer)False



The end of a printed line can be signaled by sending _____ to the cout object - (correct
answer)endl



How would you consolidate the following declaration statements into one statement?


int x = 7;

int y = 16;

int z = 28; - (correct answer)int x = 7, y = 16, z = 28;



_____________ represent storage locations in the computer's memory. - (correct
answer)Variables
$9.99
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
douglasmugwe82
5.0
(1)

Get to know the seller

Seller avatar
douglasmugwe82 Teachme2-tutor
View profile
Follow You need to be logged in order to follow users or courses
Sold
2
Member since
1 year
Number of followers
0
Documents
4239
Last sold
2 months ago
fully answered questions and answer

fully answered questions and answer

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 revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

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

Student with book image

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

Alisha Student

Frequently asked questions