Computing.Net > Forums > Programming > programming in C++

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

programming in C++

Reply to Message Icon

Name: LKessie
Date: October 27, 2002 at 04:41:59 Pacific
OS: windows xp
CPU/Ram: not known
Comment:

a)how do i write a program in C that reads English text to end of data,and print a count of word lengthi.e, the total number of words of length 1 which occured, the number of length 2 and so on.
TYPICAL OUTPUT
length 1: 23 occurences
length 2: 4 occurences
b) how do i write a function "replace" which takes apointer to a string as a parameter, which replaces all spaces in that string by minus signs, and delivers the number of spaces it replaced.
Thus, char *cat="the cat sat";
n=replace(cat);
should set, cat to "the cat sat"
and, n to 2

c) how do i write a C program to read through an array of any type using pointers. The program should scan through this array to find a particular value.



Sponsored Link
Ads by Google

Response Number 1
Name: Guti
Date: October 27, 2002 at 13:47:37 Pacific
Reply:

First get a book about C++ programming.


0

Response Number 2
Name: Mark
Date: October 28, 2002 at 11:23:44 Pacific
Reply:

You are the 3rd or 4th person to ask this exact question in this forum...look down below to see if someone answered. Sounds like someone cant heandle their homework assignment


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: programming in C++

beginners programming in c www.computing.net/answers/programming/beginners-programming-in-c/11037.html

Programming in C www.computing.net/answers/programming/programming-in-c/7343.html

Programming in C www.computing.net/answers/programming/programming-in-c/9073.html