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
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

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