473,396 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Some hint requests for read_line variations

The premise for my assignment is to write variations of the read_line
functions. The variations are:
a) skips leading whitespace before storing input
b) stops reading at first whitespace character
c) leaves behind characters that it does not have room to store

Could anyone give me a couple hints? I'm not really sure where to
start. Thanks!

Feb 10 '06 #1
3 1487
In article <11**********************@g47g2000cwa.googlegroups .com>,
emmba <em****@gmail.com> wrote:
The premise for my assignment is to write variations of the read_line
functions. The variations are:
a) skips leading whitespace before storing input
b) stops reading at first whitespace character
c) leaves behind characters that it does not have room to store Could anyone give me a couple hints? I'm not really sure where to
start. Thanks!


getc()
isspace()
malloc()
--
Programming is what happens while you're busy making other plans.
Feb 10 '06 #2
emmba wrote:

The premise for my assignment is to write variations of the read_line
functions. The variations are:
a) skips leading whitespace before storing input
b) stops reading at first whitespace character
c) leaves behind characters that it does not have room to store

Could anyone give me a couple hints? I'm not really sure where to
start. Thanks!


a) isspace();
b) !isspace();
c) ungetc();

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
Feb 10 '06 #3
Thanks everyone!

Feb 10 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mark P | last post by:
Is an insert with hint (in say std::set) only beneficial if the insertion occurs immediately before the pointed to location of the hint? Suppose the insertion occurs right after the hint location? ...
7
by: piperzen | last post by:
Hi, I'm developing a set of language learning exercises for http://www.yale.edu/swahili , and we've run into a javascript question that the programmer doesn't know how to tackle (we mostly work...
193
by: Michael B. | last post by:
I was just thinking about this, specifically wondering if there's any features that the C specification currently lacks, and which may be included in some future standardization. Of course, I...
12
by: Aaron Gray | last post by:
Hi, Here's some new code I have not seen before it is used in WikiPedia as well <!--> <style type="text/css" media="screen"> ... </style> <!-->
21
by: Jim | last post by:
I am trying to write an HTTP/HTTPS proxy server in VB.Net 2005. But, I don't really even know how the internal workings of a proxy should act. Does anyone have anything on the protocols used in...
4
by: rzimerman | last post by:
I'm hoping to write a program that will read any number of urls from stdin (1 per line), download them, and process them. So far my script (below) works well for small numbers of urls. However, it...
8
by: Michael Schwarz | last post by:
Hi, I have a problem where I have two requests (i.e. two different windows that are using the same session) that are accessing the session collection. The requests will need more time on the...
5
by: linda.chen | last post by:
Hi all, We have a webservice (service1), which calls another webservice(service2) from another orginization. Our end users make requests throught service1. When service2 receives a quest, it...
2
by: weird0 | last post by:
Hi! I need answers to these questions that were given to me in a job test. 1. What is IDisposable in .NET? 2.What is the base class of all the controls in .NET? 3.What is the difference...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.