Give the Syntax and example for initializing one dimensional array at declaration.
Answers
Answered by
15
Answer:
An array can be explicitly initialized at run time. This approach is usually applied for initializing large arrays. Ex:- scanf can be used to initialize an array. int x[3]; scanf(“%d%d%d”,&x[0],&x[1],&x[2]); The above statements will initialize array elements with the values entered through the key board.
Similar questions