S
Stefan Ram
I have an idea for a program, yet I have not yet written and
tested it.
Here is an exercise that might be solved by this program:
Write a C program to read positive int numbers from a
user (a single int number is entered by its decimal
digits and the enter key) which are terminated by entry
of the digit 0 and the enter key, then allocate an array
of exactly the required size and then store the numbers
into this array (not including the terminating number 0).
The program may only once allocate memory with allocated
storage duration (malloc, calloc or so) (that is, for
the array mentioned above), and it shall not contain any
arbitrary limit for the number of numbers a user might
enter, although limitations of the C implementation used
might indeed impose a limitation on this number.
I will post my own solution not before 2010-02-08T05:05:29+01:00,
so feel free to post your own solution as a reply to this post.
tested it.
Here is an exercise that might be solved by this program:
Write a C program to read positive int numbers from a
user (a single int number is entered by its decimal
digits and the enter key) which are terminated by entry
of the digit 0 and the enter key, then allocate an array
of exactly the required size and then store the numbers
into this array (not including the terminating number 0).
The program may only once allocate memory with allocated
storage duration (malloc, calloc or so) (that is, for
the array mentioned above), and it shall not contain any
arbitrary limit for the number of numbers a user might
enter, although limitations of the C implementation used
might indeed impose a limitation on this number.
I will post my own solution not before 2010-02-08T05:05:29+01:00,
so feel free to post your own solution as a reply to this post.