a) The C programming language distinguishes characterconstants from string const
ID: 3616546 • Letter: A
Question
a) The C programming language distinguishes characterconstants from string constants by using single quotes forcharacters and double quotes for strings. Thus, 'c' is thecharacter c , while "c" is a string of length 1 consisting of thesingle of length 1 consisting of the single character c.Why do you think this distinction is made? Is it useful?
b) Pascal on the other hand, uses single quotesfor both characters and strings (thus 'c' is either a character orstring , depending on the context).
Discuss the advantages and disadvantages of these twoapproaches.
Explanation / Answer
But no distinction in pascal for character orientation orstring orientation. They are just for understanding purposesonly..Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.