English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2007-03-21 23:31:42 · 4 answers · asked by gardenants 1 in Computers & Internet Programming & Design

I mean before giving initial value,what is the ASCII code in the memory where this array holds? '/0','space' ,or others?

2007-03-22 03:07:46 · update #1

4 answers

According to C language standards, the contents of variables are undefined before initialization.
It can contain any junk that was in the memory before.

Vivek

2007-03-22 07:04:37 · answer #1 · answered by rep_movsd 2 · 0 0

I am assuming that the language you are using is C.
If I am wrong then you will need to give more details when you ask this question again.

The statement is defining and array with 5 occurrences of a single character.
So a[0]='s' is a valid assignment.

You may find the attached link useful.

2007-03-21 23:55:27 · answer #2 · answered by AnalProgrammer 7 · 0 0

a[5] is an array you need to declare the array first.

2007-03-22 02:01:39 · answer #3 · answered by Jenna 3 · 0 0

cos it is defined only, and not created yet
u can start giving it values after u create an instance of it by using the "new" operator

2007-03-21 23:38:20 · answer #4 · answered by abd 5 · 0 1

fedest.com, questions and answers