Answer the question
In order to leave comments, you need to log in
A string is a sample (template) in SI - what is it?
A function is written to determine permissions by string int f(const char *str)
Hint: use the sample string "rwxrwxrwx" to parse the input string.
How can a string be used for parsing?
C program. Googling didn't help.
At the input of a string like:
"rwxr-xr-x"
Answer the question
In order to leave comments, you need to log in
rwxrwxrwx is the standard way to specify permissions on Posix systems (like Linux).
letters are decoded as "Read" "Write" "eXecute"
three sets - the first owner, the second group - all the others.
thus rwxr-xr-x means that the owner has rwx (all rights), the group has rx, the rest (who is not the owner and is not included in the specified group) have rx
The standard way to set permissions in a Unix environment.
owner/group/other
read - r/write - w/execute - x. If the appropriate right is not established, then -
You should return an int, where bit 0 is set if and only if the first character of the string matches the first character of the pattern, bit 1 is set when the second character of the string matches the second character of the pattern, and so on.
In the example, as far as I understand, you need to give a number equal to 101101111 in binary.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question