• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/28

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

28 Cards in this Set

  • Front
  • Back
  • 3rd side (hint)
When was the C language Developed
In 1972
The C language was developed in 1972 by Dennis Richie at Bell Telephone laboratories, primarily as a systems programming language. That is, a language to write operating systems with. Richie’s primary goals were to produce a minimalistic language that was easy to compile, allowed efficient access to memory, produced efficient code, and did not need extensive run-time support.
What advantage does C have as a programming language?
It is very portable
Operating systems written in C, allowed UNIX to be recompiled on a lot of different types of computers, which sped up the acceptance of UNIX.
When was C++ developed?
In 1979
C++ was developed by Bjarne Stroustrup at Bell Labs as an extension to C, starting in 1979. C++ was ratified in 1998 by the ISO committee, and again in 2003 (called C++03, which is what this tutorial will be teaching). A new version of the standard, known as C++11 has been made available since the time these tutorials were written — updates to the tutorial to cover C++11′s additions will be made in the appendix.
How can the underlying design philosophy of C and C++ be summed up?
"Trust the programmer"
The compiler will not stand in the way of a programmer trying to do something unorthodox that makes sense, but is also dangerous because the compiler will not stand in the way of the programmer writing something tha tcould have unexpected results.
How many steps of program development are there?
6
1) Define the problem to be solved
2) Design a solution
3) Write a program that implements the solution
4) Compile the program
5) Link object files
6) Test and debug the program.
What does a compiler do?
1) Checks the program and makes sure that it follows the syntactical rules of the C++ language
2) Takes the source code as input, and produces a machine language object file as output.
How are C++ programs typically named?
NAME.cpp (where NAME = the name of the program you've written, e.g. bob.cpp)
How are C++ object files usually named?
NAME.obj (where NAME is the same NAME as the .cpp file it was produce from, e.g. bob.obj)
What is linking?
LInking is the process of taking all the object files for a program and combining them into a single executable
What is an IDE
Integrated Development Environment: Contains all the tings you need to develop, compile, link and debug your programs. Examples include Microsoft's Visual C++ Express Edition, Code::Blocks and Bloodshed's Dev-C++
What is a computer program?
A sequence of instructions that tells the computer what to do.
What is a Statement?
A Statement in C++ is the smallest independent unit in the lanugage
In "human-language" a statement is like a sentence. A statement is used to tell the compiler that we want the computer to perform a task.
How does a Statement end in C++
With a semicolon ;
What are the three common types of statements in C++
Declaration statements, assignment statements, and expressions.
What is a declaration statement?
A declaration statement tells the compiler something.
In the case of the declaration statement, int x; it tells the compiler that x is a variable. All variables in a program must be declared before they are used.
What is an assignment statement?
An assignment statement assigns a value to a variable.
In the case of X = 5, the assignment statement assigns the value of 5 to the variable X (the variable that was declared in the previous example.)
What is an expression?
An expression is a mathematical entity that evaluates to a value.
For example, in math, the expression 2 + 3 evaluates to the value 5. Expressions can involve values (such as 2) , variables (such as x), operators (like +) and functions (which return an output value based on some input value.) They can be singular (such as 2, or X) or compound (such as 2+3, 2+x, x+y or (2+x)*(y-3)
What is a function?
A group of statements that executes sequentially.
Every C++ program must contain a special function called main(). When the C++ program is run, execution starts with the first statement inside of main(). Functions are typically written to do a very specific job. For example, a function named Max() might contain statements that figures out which of two numbers is larger. A function named CalculateGrade() might calculate a student’s grade.
What is a library
A group of functions "packaged" for reuse in many different programs.
For example, the iostream library contains functions for doing input and output.
1 #include <iostream>
2
3 int main()
4{
5 using namespace std;
6 cout << "Hello world!" << endl;
7 return 0;
8 }

On what line does the main function appear?
Line 3 declares the main () function.
1 #include <iostream>
2
3 int main()
4{
5 using namespace std;
6 cout << "Hello world!" << endl;
7 return 0;
8 }
What lines tell the compiler which lines are part of the main function?
Lines 4 and 8. Everything between the opening curly brace on line 4 and the closing curly brace on line 8 is considered part of the main function.
1 #include <iostream>
2
3 int main()
4{
5 using namespace std;
6 cout << "Hello world!" << endl;
7 return 0;
8 }

On what line does the FIRST statement appear?
Line 5:
using namespace std;
1 #include <iostream>
2
3 int main()
4{
5 using namespace std;
6 cout << "Hello world!" << endl;
7 return 0;
8 }

What line shows the output statement?
Line 6:
cout << "Hello world!" << endl;
1 #include <iostream>
2
3 int main()
4{
5 using namespace std;
6 cout << "Hello world!" << endl;
7 return 0;
8 }

What line shows the return statement?
Line 7:
return 0;
When an executable program finishes running, it sends a value to the operating system that indicates whether it was run successfully or not. The return value of main() is used for this purpose. This particular return statement returns the value of 0 to the operating system, which means “everything went okay!”. Non-zero numbers are typically used to indicate that something went wrong, and the program had to abort.
What is the difference between a statement and an expression?
A statement is a “complete sentence” that tells the compiler to perform a particular task. An expression is a mathematical entity that evaluates to a value. Expressions are often used inside of statements.
What is the difference between a function and a library?
A function is a collection of statements that executes sequentially, typically designed to perform a specific job. A library is a collection of functions that is meant to be reused by many programs.
What symbol do statements in C++ end with?
The semicolon (;)
What is a comment?
A comment is a line (or multiple lines) of text that are inserted into the source code to explain what the code is doing.