C++

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

The rules that govern the correct order and usage of the elements of a language are called the... of the language.

Syntax

An error in a program that involves a violation of language rules will be detected at... time.

compile

Write a statement that prints Hello World to the screen.

cout << "Hello World";

Suppose your name was Alan Turing. Write a statement that would print your last name, followed by a comma, followed by your first name. Do not print anything else (that includes blanks)

cout << "Turing,Alan";

Given an integer variable count, write a statement that writes the value of count to standard output.

cout << count;

Division by zero when the program is executing is an example of a ... error.

run-time

Write the include directive needed to allow use of the various I/O operators such as cout and cin.

#include <iostream> using namespace std;

Write a complete program that prints Hello World to the screen

#include <iostream> using namespace std; int main() { cout << "Hello World"; return 0; }

Write a complete program that -declares an integer variable, -reads a value from the keyboard into that variable, and -writes to standard output the square of the variable's value. Besides the number, nothing else should be written to standard output.

#include <iostream> using namespace std; int main() { int num; cin >> num; cout << num * num; return 0; }

The purpose of testing a program with different combinations of data is to expose run-time and... errors.

logical


Kaugnay na mga set ng pag-aaral

Prin. of Biology II Lecture Exam

View Set

honors world history - vocab unit one

View Set

Nursing care of the child with an alteration in tissues integrity/Integumentary disorder

View Set

Nonrenewable Energy Resources & Consumption

View Set

Intro to Art UNIT 9: INTRO TO ART HISTORY: ANCIENT ART IN DIFFERENT CULTURES (Time4Learning)

View Set

Qualification: Processing and Underwriting

View Set

Chapter 10 Plants (Written Questions)

View Set

CC - MKTG 2400, CC-MGT 3680, CC IS 2500

View Set

Specialized life insurance policies

View Set

chemistry and society final - chapter 8

View Set