Why an array initialisation is not possible in the main()ex:---------char arry[6][6];main(){c={"rotor","motor",peter","mater","water"};}

Questions by j_priyaa

Showing Answers 1 - 15 of 15 Answers

manjunatha shanubhoganahalli

  • Dec 31st, 2006
 

With out memory location we can`t intialize the array element.

in the above case you can initalize the value to arry[6][6] variable but you can`t do that in c its not at all possible.

  Was this answer useful?  Yes

AMEER

  • Jan 18th, 2007
 

you can initalize the value to arry[6][6] variable but you can`t do that in c its not at all possible.

  Was this answer useful?  Yes

subbareddy

  • Feb 5th, 2007
 

you are giving example above.By basing on that example array initialisation is possible.why not possible.can you detailed answer.

  Was this answer useful?  Yes

defmer

  • Feb 12th, 2007
 

first of all supposed array "a" does not have a type defined...so that itself will give out compilation errors.

  Was this answer useful?  Yes

vijay

  • Mar 20th, 2007
 

if u want to initialize an array u will have to initialize it where it is declared. u cant initialze it later.

so char arr[6][6]={"rotor","motor","peter","mater","water"};
  is the correct way.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions