i being a total beginner need ur help
problem::write a program in C++ to read a set of lines and store them in array A.again read a string S and check whether the gven string is in the array A.
if it so, print that line and also how many times the string is repeated in the array A.
plz do this problem using just arrays and functions(simple).
don't use classes, structures,pointers and all other higher things
hoping for reply soon
help needed!!!
Started by
Guest_tarzan_dubya_*
, Dec 14 2006 11:08 AM
6 replies to this topic
#1
Guest_tarzan_dubya_*
Posted 14 December 2006 - 11:08 AM
Guest_tarzan_dubya_*
|
|
|
#2
Posted 14 December 2006 - 12:05 PM
1) do you know how to create an array?
2) do you know how to create an array of strings?
3) do you know how to use a for loop to traverse an array?
4) do you know how to compare strings?
Break the problem down into simple tasks, and deal with each task. Note: I gave you a hint in my questions.
2) do you know how to create an array of strings?
3) do you know how to use a for loop to traverse an array?
4) do you know how to compare strings?
Break the problem down into simple tasks, and deal with each task. Note: I gave you a hint in my questions.
#3
Posted 14 December 2006 - 02:52 PM
I've been here for months and I still don't know what an array is. I'm a little more familiar on strings, though.
#4
Posted 14 December 2006 - 06:50 PM
DevilsCharm said:
I've been here for months and I still don't know what an array is. I'm a little more familiar on strings, though.
Sidewinder said:
An array is a named place to store a SET of values allowing you to group common types.
Although its not the same syntax as C++ reading this should give you the idea of what an array is http://forum.codecal...ial-arrays.html
#5
Posted 15 December 2006 - 04:23 PM
Are you familiar with what a matrix is? (The math one, not Keanu Reeves)
#6
Posted 15 December 2006 - 06:42 PM
A matrix would be more of a multi-dimensional array. I like to concider an array just a indexed list.
#7
Posted 15 December 2006 - 06:47 PM
2 dimensional arrays are like a matrix. 1 dimensional arrays are like a row matrix. Both refer to their elements in about the same manner.


Sign In
Create Account

Back to top










