Lecture 9 Flashcards

1
Q

Why has unix evolved to use single letter arguments?

A

Because it’s easier to use -af instead of -a -f

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

What does stlen do?

A

Returns the number of characters in the string?

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

What does strcmp do?

A

Compare two strings

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

strcopy?

A

Copy one string to another

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

What does strcat do?

A

Append one string to another

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

What does strchr do?

A

Search a string for one character

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

What is strstr?

A

Search for a string for a substring

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

What is strtok?

A

Extract the next token from a string

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

What does fgets do?

A

Read in a string

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

What does sscanf do?

A

Extracts elements from a string

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

What does snprintf do?

A

Create a string from a pattern

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

how do we check for a letter?

A

isalpha

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

How do we check for a digit?

A

isdigit

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

How do we check for a lower case letter?

A

islower

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

How do we check for an upper case alpha?

A

isupper

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

How do we check for a space?

A

isspace

17
Q

How do we check for a printable character?

A

isprint