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 had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...

Similar threads

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