Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

Introduction To Programming COS1511

Beoordeling
-
Verkocht
-
Pagina's
5
Cijfer
A+
Geüpload op
16-10-2024
Geschreven in
2024/2025

Introduction To Programming COS1511 IDE - ANSWERSIntegrated Development Environment cout - ANSWERSStands for console output; the standard output stream object in C++; used with the insertion operator to display information on the computer screen #include iostream - ANSWERSThe include directive needed to allow use of the various I/O operators such as cout and cin. using namespace std; - ANSWERSDeclares that the program will be accessing entities whose names are part of the namespace called std int main() - ANSWERSThe header for the main function of the program, int tells compiler function will be returning an integer (return 0;) Statement Terminator - ANSWERSThe semicolon (;) is used to indicate the end of a statement. Comments - ANSWERSUsing descriptive text to explain portions of code. Comments do not change the way a robot behaves, but are important for the programmer to remember what the code does. endl; - ANSWERSA stream manipulator used with cout that can be used to advance the cursor to the next line on the computer screen Syntax Rules - ANSWERSProgramming syntax rules must be followed for the compiler to understand you Good Programming Style - ANSWERSLeaving open lines, putting statements on seperate lines, using comments in code, indenting code etc. BODMAS - ANSWERSBrackets, Order, Division, Multiplication, Addition, Subtraction Data Type: Integer - ANSWERSInteger numerical ; No decimals/fractions (Even with division); Positive and Negative Numbers; Variable - ANSWERSWe declare a var with a name so we can refer to the value stored in the memory position in a program; Use meaningful names; Always declare or initialise before use. Variable and Function Name Rules - ANSWERSCannot start with a numeric character, but numbers and all letters can be used after that; Can start with or have an underscore _ ; Cannot used reserved names, eg. int, return. Case Sensitive. Can use CamelNotation.

Meer zien Lees minder
Instelling
Introduction To Programming COS1511
Vak
Introduction To Programming COS1511

Voorbeeld van de inhoud

Introduction To Programming COS1511
IDE - ANSWERSIntegrated Development Environment

cout - ANSWERSStands for console output; the standard output stream object in C++;
used with the insertion operator to display information on the computer screen

#include <iostream> - ANSWERSThe include directive needed to allow use of the
various I/O operators such as cout and cin.

using namespace std; - ANSWERSDeclares that the program will be accessing entities
whose names are part of the namespace called std

int main() - ANSWERSThe header for the main function of the program, int tells
compiler function will be returning an integer (return 0;)

Statement Terminator - ANSWERSThe semicolon (;) is used to indicate the end of a
statement.

Comments - ANSWERSUsing descriptive text to explain portions of code. Comments
do not change the way a robot behaves, but are important for the programmer to
remember what the code does.

endl; - ANSWERSA stream manipulator used with cout that can be used to advance
the cursor to the next line on the computer screen

Syntax Rules - ANSWERSProgramming syntax rules must be followed for the compiler
to understand you

Good Programming Style - ANSWERSLeaving open lines, putting statements on
seperate lines, using comments in code, indenting code etc.

BODMAS - ANSWERSBrackets, Order, Division, Multiplication, Addition, Subtraction

Data Type: Integer - ANSWERSInteger numerical ; No decimals/fractions (Even with
division); Positive and Negative Numbers;

Variable - ANSWERSWe declare a var with a name so we can refer to the value stored
in the memory position in a program; Use meaningful names; Always declare or
initialise before use.

Variable and Function Name Rules - ANSWERSCannot start with a numeric character,
but numbers and all letters can be used after that; Can start with or have an underscore
_ ; Cannot used reserved names, eg. int, return. Case Sensitive. Can use
CamelNotation.

, Modulo (or "mod") - ANSWERSthe name of the mathematical operation. Modulo gives
the remainder from dividing two numbers. For example: 17 MOD 13 is 4.
X MOD 1 is always 0.

Assignment Operator - ANSWERSThe '=' character causes the compiler or interpreter
to evaluate to the expression on its right and store the result in the variable(s) on its left.
Variable = Expression;

Compound Assignment Operator - ANSWERSan operator that combines assignment
(setting value of the variable) with another operation, such as addition or subtraction.

Unary Increment and Decrement Operators - ANSWERSThese operators (++, --)
together with the variable they are operating on, return a value, which depends on if
operator is used in prefix or postfix form.

Prefix Form (++i or--i) - ANSWERSFirst increments/decrements the variable, then uses
the incremented value in the expression.

Postfix Form (i++ or i--) - ANSWERSFirst uses the current variable value in the
expression, and then increments/decrements the variable.

Variable Diagrams - ANSWERSCan be used to work out what complicated programs
do, help you find bugs in your program.

Data type: double - ANSWERSFundamental data type built into compiler used to define
numeric variables holding numbers with decimal points.

Data Type: Float - ANSWERSShortened term for Floating Point; Fundamental data
type built into compiler used to define numerical variables with floating decimal points.

cout.setf(ios::fixed) - ANSWERSSets numbers to non-scientific

cout.precision(2); - ANSWERSSets decimals to 2, default is 6

Implicit Conversion / Coercion - ANSWERSA conversion from one data type to another
that occurs automatically by the compiler, information can be lost (eg, conversion of
Float to Int)

Explicit Conversion / Type Casting - ANSWERSThe data type transformation caused
using a cast operator. We place value to be converted in parenthesis and procede it
withnthe type we wish to convert it to.

Scientific Notation - ANSWERSC++ outputs floating point in fixed or scientific notation,
which is a method of writing or displaying numbers in terms of a decimal number
between 1 and 10 multiplied by a power of 10. Prevented using cout:setf(ios::fixed)

Geschreven voor

Instelling
Introduction To Programming COS1511
Vak
Introduction To Programming COS1511

Documentinformatie

Geüpload op
16 oktober 2024
Aantal pagina's
5
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

€9,27
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
muchiracalorine

Maak kennis met de verkoper

Seller avatar
muchiracalorine waldern university
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
2
Lid sinds
2 jaar
Aantal volgers
1
Documenten
137
Laatst verkocht
1 jaar geleden

0,0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen