• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

char default value ?

 
Aru
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone tell ..what is the default value for char variables ?
1) After the declaration: what is the value of c[50]?
char[] c = new char[100];
a) 50
b) 49
c) '\u0000'
d) '\u0020'
e) " "
f) cannot be determined
g) always null until a value is assigned
Thx
 
Stephanie Grasson
Ranch Hand
Posts: 347
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aru,
The default value for char is '\u0000'.
Hope this helps.
 
Aru
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Stephanie.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic