String-handling Operations (AQA GCSE Computer Science): Flashcards

📚Flashcards
Concatenation
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

12 cards from this deck

Show

String concatenation

Joining multiple strings together

Operator for string concatenation

The + operator

Order in string concatenation

Strings joined in exact order specified

Operator overloading

  • does different things based on data type
  • operator with numbers

Performs mathematical addition (5+3=85+3=8)

  • operator with strings

Joins strings ("hello"+"world"="helloworld")

Automatic spaces in concatenation

No, must add spaces manually

Result of "hello"+"world"

"helloworld" (no space)

Adding space in concatenation

"hello"+" "+"world" = "hello world"

Effect on original strings

Creates new string, originals unchanged

Example: user greeting concatenation

"Hello, " + username

Mixing literals and variables

Yes, can combine both in concatenation

Join 100,000+ GCSE students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.