Lesson 2 of 24
Variables, auto மற்றும் stringVariables, auto and string
8 min 20 XP
C++-ல் bool (true/false) மற்றும் string (text) types உள்ளன; C-ன் char array தொல்லை இல்லை. auto மூலம் compiler தானாக type-ஐக் கண்டுபிடிக்கும்.
C++ adds bool (true/false) and string (text), so no more C char-array headaches. With auto the compiler works out the type for you.
Example: edit me and press Run
Press Run to see the result here.bool இயல்பாக 1/0 என்று print ஆகும்; boolalpha போட்டால் true/false. தசம இடங்களுக்கு <iomanip>-ல் fixed << setprecision(2).
A bool prints as 1/0 by default; boolalpha prints true/false. For decimal places use fixed << setprecision(2) from <iomanip>.