C++ Programming

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What is a variable?

A placeholder there are many types

What is int?

A variable integer.

Are blank lines and tabs necessary?

Blank lines are not necessary but make the program easier to read. The same goes for tabs.

What is C++ and enhancement to?

C++ is an enhancement to C.

What is the standard C++ used today?

C++ version 11 is the standard used today.

What is C++?

C++ was created in the late 70's by a Danish programmer Bjorn.

What does endl mean?

Goto the end of the line. you can also use \n inside the ""

What is each line called?

It is called a statement

What is "using namespace std"?

Tells the program that you are going to be using the standard (std) library. Not the other thing abbreviated as std.

What is a loop?

Tells the program to run it over and over again.

What are functions?

The meat and potatoes of the program that tell the computer what you want to do.

How do we get the program to move to a new line?

Use << endl; or you can use /n inside the ""; or you can do /n/n for a blank line.

What operations can you use in C++?

+,-, *, / if you want the remainder you need to use % modulus operator

What kinds of tests are there?

<, >, <=, >=, == (inequality only used with ==), != (not equal to).

What is the if statement?

A basic way that computers can make decision.

What is x += 10;

Assignment and increment operators. Can also be used -=, *=, and /= it is a shortcut that is used only when x is defined previously.

What does each function line end with?

Each function line ends with a ";"

What is ++ after/ before the variable?

Increment operator that adds 1 to the variable. Before adds the 1 before the output.

What does each statement end with?

It ends with a semicolon;

What does "return 0" mean?

It is part of the main function and it is set to zero. It will give the output unless there is an error.

Where is a variable stored?

It is stored in memory. the last variable definition will be the value used. All others will be erased.

What is C++ the goto programming language For?

It is the goto programming for application and OS

What does cout mean?

Output stream object used to write characters on the screen.

What order does C++ do the operations in?

PEMDAS

What does STL Stand for?

STL stands for the standard template library.

What does << mean?

The stream insertion operator. Used in conjunction with cout.

What is "if else"?

To run a test and then determine an output. if(test) {there is a command in here }else{there is a command in here} you can have as many commands as you want.

What is a while loop?

Use the term "while (variable)" you can make a definition and then have a number added to it so that at some point the statement will be false.

What is "nesting if statements"?

When you put additional if statements inside the brackets? You can do it as many times as you want

What is cin?

When you want to take information in from the computer. You use >> in front to take in information.

What can you do with variables?

You can define them to equal relationships of each other. a= 5, b=21, and sum = a + b then cout the sum variable you can also assign a variable immediately or later it is called "declaring the variable".

How do you tell the program where to start?

You use the function "main". in C++ it is "int main()"

What is #include <iostream>?

a header fle #include <iostream> is a preprocess directive. Telling the program that there is a file that we are going to use later.

What types of programming is C++ used for?

it is used for object oriented, funtional, procedural, and generic programming.

How many times do you have to define the variable?

only once like once you put int you don't have to do it.

How do you write text that you want to be commented out?

use two forward slashes at the beginning of the line. // or you can use /*...*/ for a paragraph. Both are ignored by the compiler.

What does "x++" mean?

x+1

What goes inside {}?

{} indicated the inclusion of functions


Ensembles d'études connexes

Physiology of stomach and absorption

View Set

Chapter 12 Quizlet French Revolution

View Set

DP-500: Designing and Implementing Enterprise-Scale Analytics Solutions Using Microsoft Azure and Microsoft Power BI

View Set