GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

4. Common Facilities of Programming Languages

deepi1k73 Flash cards A levels Englisch 12 Karten

Karten in diesem Stapel (12)

  1. 1What is an assignment statement?What is in the left side is assigned to what is on the right side- e.g. surname = name- assigns ‘name’ under the variable surname
  2. 2What are the different arithmetic operators?add- '+', subtract '-', divide '/', multiply '*', exponential (power of...) '^', MOD- finds the remainder of the division, DIV- divides two numbers and ignores remainder
  3. 3What are the different relational operators?Equals '=' or '==', less than '<', more than '>', less than or equal to '<=', more than or equal to '>=', not equal to '<>' or '!='
  4. 4What are the different boolean operators?and- assigns false to all comparison except true and true- pseudo 'AND'- c# '&'
    or- assigns true to all comparisons except false or false- pseudo 'OR'- c# '||'
    not- assigns the opposite to the one value stated- pseudo 'NOT'- c# '!'
  5. 5What is the the order of precedence (priority) of standard operators and the effect of brackets?For all operators the computer reads from left to right. However for arithmetic operators it follows the rules of BODMAS. If a brackets is present, what is in the bracket is first done before moving on (for all standard operators).
  6. 6How do you locate a string in another string?Pseudo: LOCATE(str1, str)
    c#: str.IndexOf("str1")
    this finds the starting position of 'str1' in str- given as a number- if not there gives -1
  7. 7How do you find the first n characters in a string?pseudo: LEFT(n, str)
    c#: str.Substring(0,n)
  8. 8How do you find the middle n characters in a string?Pseudo: MID(str, m, n)
    c#: str.substring(m,n)
  9. 9How do you find the last n characters in a string?Pseudo: RIGHT(str,n)
    c#: str.Substring(str.length-n, n)
  10. 10How do you find the length of a string?Pseudo: LENGTH(str)
    c#: str.Length
    returns number of characters in the string.
  11. 11How do you convert between characters and ASCII?ASCII- the American Standard Code for Information Interchange-7 binary bits 8th for parity (one character)
    ASCII to characters: CHAR(67)
    character to ASCII: ASCII("A") - c#: (int)"A"
  12. 12How do you join two strings together?This is called concatenation- use + or &

Informationen

Beschreibung
A levels Flash cards Karteikarten am 4. Common Facilities of Programming Languages, erstellt von deepi1k73 am 24/05/2014.
Erstellt von
deepi1k73
Aufrufe
16
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck