Solving Pointer in C Language: Placing ptr on name1,2,3

  • Thread starter Thread starter pouchito
  • Start date Start date
  • Tags Tags
    Language Pointers
AI Thread Summary
The discussion revolves around a programming challenge involving pointers in C language. The user is attempting to create pointers for three names formatted as "name1 < name2 > name3". They successfully implemented logic using `strcmp` to assign pointers for name1 and name2 but encountered difficulties with name3. After expressing frustration over spending extensive time on the problem, they received advice emphasizing the importance of clear problem specification in programming. Ultimately, the user reported that their issue was resolved, indicating they found a solution to their problem.
pouchito
Messages
20
Reaction score
0
pointers ...C language

I need your help:

name1 < name 2 > name 3

I m writing a problem that place:
a pointer on name 1
a pointer on name 2
a pointer on name 3

I have been working on it more than 24 hours but in vain :cry:

what i did is strcmp with < if it is place ptr 1 (it works)
then
strcmp if there is sthg after the < place ptr 2 (it works)

BUT The same procedure didn't work for the latest name PLEASE I SPEND hundreds of hour on writing my program and i m still stuck in many parts...can u help me solving this part

thanks
 
Technology news on Phys.org
A name, assuming that you made it an array of characters, will always be a pointer. Make sure you understand that completely. It would help immensely if you posted your code so I can see exactly what you're doing incorrectly.
 
not clear

I don't understand your problem specification. The number one rule of computer science is that the problem specification must be spelled out clearly and non-ambiguous. You will find out this true for small assignments, and real projects.
 
my problem is solved !

Thanks all of you
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

Replies
2
Views
1K
Replies
2
Views
11K
Replies
75
Views
6K
Replies
1
Views
2K
Replies
2
Views
5K
Back
Top