Programming 2- module 10) Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What does handling strings refer to?

A

‘Groups of characters’.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are there a range of that you might need to perform on strings?

A

Operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is length?

A

Number of characters.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the position?

A

Location of specified substring.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is concatenation?

A

Joining of strings end-to-end.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is an important characteristic of each string?

A

Its length.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What can the length of a string be?

A

Any whole number or integer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a substring?

A

Any contiguous sequence of characters within a string.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What tasks are there?

A
Return the length of a string.
Return the position in a string.
Return the substring data within the string.
Concatenation of 2 strings.
Convert string -> integer.
Convert integer -> string.
Convert string -> real.
Convert real -> string.
Convert content of string -> upper case.
Convert content of string -> lower case.
Comparison of 2 strings.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the pseudocode examples of the return the length of a string task?

A

Stringname.length OR LEN(stringname).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a pseudocode example of the return the position in a string task?

A

String.indexOf(n).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the pseudocode example of the return the substring data within the string task?

A

Stringname.

SubString(startingPosition, numberOfCharacters).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the pseudocode example of the concatenation of two strings?

A

String.Join OR NewString = String1 + String2 (can also sometimes include: , and &).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the pseudocode example of the task: convert string to integer?

A

int(string).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the pseudocode example of the task: convert integer to string?

A

str(integer).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the pseudocode example of the task: convert string to float/real?

A

float(string).

17
Q

What is the pseudocode example of the task: convert float/real to string?

A

str(variable).

18
Q

What is the pseudocode example of the task: convert content of string to upper case?

A

String.toUpper(inString).

19
Q

What is the pseudocode example of the task: convert the content of string to lower case?

A

String.toLower(inString).

20
Q

What is the pseudocode example of the task: comparison of the content of two strings?

A

strcmp(string1,string2).

21
Q

What does ‘pseudorandom’ mean?

A

Number selection that follows rule rather than offering numbers on truly random basis.