| 1. |
You are about to study the fundamentals of C++ programming Language. Do a comparative study of the basics of the new language with that of a formal language like English or Malayalam to familiarize C++? Provide sufficient explanations for the compared items in C++ Language. |
|
Answer» 1. Character set: To study a language first we have to familiarize the character set. For example, to study English language first we have to study the alphabets. Similarly here the character set includes letters(A to Z & a to z), digits(0 to 9), special characters(+, -, ?, *, /, …..) white spaces(non printable), etc. 2. Token: It is the smallest individual units similar to a word in English or Malayalam language. C++ has 5 tokens
Eg: float is used to declare variable to store numbers with decimal point. We can’t use this for any other purpose
Eg: variable name, function name, class name, object name, etc…
eg: In maths % = 3.14157 and boiling point of water is 100.
eg:{,}, (,), ……..
|
|