Hello everyone!I have started the book Algorithms in C by Robert Sedgewick and at the end of each chapter there are additional practice problems for solving.I stumbled on one that I can't seem to understand.It goes as follows:
Write a function int convert() that reads a decimal number one character(digit) at a time,terminated by a blank,and returns the value of that number.

Now my question is,since this function has no parameters,where exactly am I going to read it from? It's just strange,if anyone has any suggestions please help me out :) Thanx all!

Recommended Answers

All 2 Replies

How about fetching it from the keyboard?

Read from stdin?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.