hw-text - 3. (string1[loc] == 't'...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Practice: Text Processing Here are a few practice problems related to text processing. Given these declarations: int loc = 2; char string1[5] = "bit"; char string2[5] = "byte"; Evaluate the following expressions to true or false: 1. (string1[loc] == 'i') 2. (string1[loc] == 't' || string2[loc] == 't')
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3. (string1[loc] == 't' && string2[loc] == 't') 4. (string1[0] == string2[0]) 5. (string1[1] == 'b' || strlen(string1) == 3) 6. (string1[1] == 'b' && strlen(string1) == 3) 7. (string1[1] != 'b' && strlen(string1) == 3) 8. !(strlen(string1) >= strlen(string2))...
View Full Document

Ask a homework question - tutors are online