Exercise 9-4. Beginning C, I. Horton

Implement a function that has the prototype:

char* to_string(int count, double first, ...);

The function should return a string that contains string representations of the second and subsequent arguments, each to two decimal places and separated by commas. The first argument is a count of the number of arguments that follow. Write a suitable version of main() to demonstrate the operation of your function.

La solución que propongo es:

exercise_9_4b

Y con funciones:

exercise_9_4d

Advertisements
This entry was posted in C. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s