Access over 20 million homework & study documents

search

5D (C Programming) Given the C int variable c, comment on whether th

Content type
User Generated
Rating
Showing Page:
1/1
5D (C Programming) Given the C int variable c, comment
on whether the following 2 conditions are equivalently
coded in C? Explain why? condition 1: if (c = = \'Y\' || c
= = \'B\' || c = = \'C\' || c = = \'D\')... condition 2: if (c
> = \'A\' && c
Solution
1.
Condition 1 is true
as we cant range characters like in the second condition.
as we can range with numbers only not with character.
2.
Nope the prase you mentioned is wrong. because we need
to eng each and everystateent with \";\" in c language, if
the statements are embeded in { } also we need to end
them with ; only

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
5D (C Programming) Given the C int variable c, comment on whether the following 2 conditions are equivalently coded in C? Explain why? condition 1: if (c = = \'Y\' || c = = \'B\' || c = = \'C\' || c = = \'D\')... condition 2: if (c > = \'A\' && c Solution 1. Condition 1 is true as we cant range ch ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Awesome! Perfect study aid.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Documents