
412 Programming in C
Explanation:
The above program is similar to the previous one. In the output, the message is displayed,
though we have not entered any number. This is the only drawback of the do–while state-
ment. It executes once, though the given condition is false.
10.12 FUNCTIONS WITH ARRAYS AND POINTERS
(i) Initialization of Array Using Function
User initializes the array using statement like int d []={1,2,3,4,5}; instead of this, a function
can also be directly called to initialize the array. The given below program illustrates this point.
10.37 Write a program to initialize an array using functions.
int y()
{
int x; ...