![]() |
.. (לתיקייה המכילה) | |
In question 1, should I ignore white spaces before the id? | |
Yes. Use scanf(" %c", ... to achieve this effect. |
Can we assume that the ID and the operation character in question 1 will not contain white-spaces (new-line, space, enter, etc…)? | |
Yes. |
It’s written in hw1 q2 that we have to ignore leading zeros in the input, but then how can you encode a word that begins with a letter whose ASCII end with 0? | |
Using this code you won't be able to encode (and then decode correctly) any word that begins with a letter which its lower case corresponding letter is represented by ASCII number that ends with 0-s, just because you will lose these zeros when you decode. Don't try to encode a message and see if you are able to decode it correctly, just think about this exercise as decoding a message by following some rules. So, if your input is 001011, by the rules written in the exercise you should treat it as 1011. |
In hw1 q1, can ID begin with 0-s? | |
Yes, for example all these are legal: 12345678, 01234567, 00123456 |
In hw1 q2, what will be the decoded word for the encoded word 790179 ? | |
a |
can we use functions defined in math.h? | |
No |