Char test='s' | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Char test='s'

What's this? Can someone explain this in detail

15th Aug 2016, 9:42 AM
vishwas
vishwas - avatar
3 Answers
+ 3
char is the data type, it's short for character. Just like an int variable can hold an integer like 5, a char variable can hold a character like 's'. Test is just the name of the variable. This whole statement assigns the character 's' to the character variable named test. If you have any more questions please ask :)
15th Aug 2016, 10:01 AM
Jonathan Dirks
Jonathan Dirks - avatar
0
Ohk i wanted to know about test, thanks
15th Aug 2016, 12:43 PM
vishwas
vishwas - avatar
0
test, in this declaration is a variable. It may be used to store one character in your code. For example, test can store the result of an exam.
22nd Aug 2016, 4:41 AM
Tamas Szekffy
Tamas Szekffy - avatar