AQA · GCSE · Computer Science

    Course version: 8525 · Version from Sept 2020

    String handling operations in a programming language: concatenation

    Concatenation joins two or more strings end to end to make one new string, usually with the + operator or a join function.

    Checked against the AQA 8525 specification (opens in a new tab) on .

    • Point 4 of 11

    Study notes

    From the checked teaching notes for this specification point.

    The idea

    Concatenation joins two or more strings end to end to make one new string, usually with the + operator or a join function. Order matters: "Hello" concatenated with "World" gives "HelloWorld", not "WorldHello". No space is inserted automatically, so learners must add spaces explicitly if they want them. Concatenation works with string literals, string variables and the results of other operations such as substring extraction or number-to-string conversion. Learners should be able to trace a short expression, track the value of each variable, and predict the exact combined output, including case and punctuation. Recognise that concatenation builds new strings and does not modify the originals.

    What earns the marks

    • Defines concatenation as joining strings end to end to form a single new string.
    • Applies the correct left-to-right order when combining two or more strings.
    • Recognises that no separator or space is added automatically.
    • Predicts the exact combined output, preserving case and punctuation, and notes the original strings are unchanged.

    Common mistakes and how to put them right

    • Reversing the order of the joined strings.

      Put it right: Join in the order written, left operand first.

    • Expecting an automatic space between words.

      Put it right: Insert a space character explicitly where needed.

    • Trying to concatenate a number directly without conversion.

      Put it right: Convert the number to a string first where the language requires it.

    Exam tips

    • Substitute each variable's current value before combining the strings.
    • Write the result character by character to avoid dropping spaces or punctuation.
    • Check whether the language needs explicit conversion of numbers to strings.

    Try the lesson

    The start of the String handling operations in a programming language: concatenation lesson, made from checked teaching notes for this specification point.

    Have a go first

    The variables firstName holds "Sam" and lastName holds "Patel". What is produced by concatenating firstName, a single space, then lastName?

    There is more to this lesson

    The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.

    Carry on with the full lesson

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge

    Test your understanding of String handling operations in a programming language: concatenation

    Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.

    Take topic quiz

    A week of Premium from your first lesson · Then the free plan continues · No card, no charge