microprocessor program

Papabravo

Joined Feb 24, 2006
21,159
Anything is possible. Practical is another matter entirely. Generating palindromes of random symbols is trivial and involves a simple data structure called a pushdown stack. Generating a meaningful palindrome in any of the planets natural languages is a bit tougher. A related problem called a fuzz phrase generator is easy and loads of fun to program and observe. Tell us more about what you had in mind.
 

beenthere

Joined Apr 20, 2004
15,819
A bit tougher? No only does a palindrome have to be a mirror reflection in the characters used, it also has to make sense. Could any processor parse "Madam, I am Adam"? Or have come up with it to begin with? Drop the caps and punctuation and it's "madamiamadam". Nothing really jumps out to me.

Can you make palindromes in Chinese?
 

Papabravo

Joined Feb 24, 2006
21,159
A bit tougher? No only does a palindrome have to be a mirror reflection in the characters used, it also has to make sense. Could any processor parse "Madam, I am Adam"? Or have come up with it to begin with? Drop the caps and punctuation and it's "madamiamadam". Nothing really jumps out to me.

Can you make palindromes in Chinese?
It's not a palindrome in that form - you have to use the contraction I'm for "I am"
 

Thread Starter

sharma2k7

Joined Dec 10, 2007
36
Anything is possible. Practical is another matter entirely. Generating palindromes of random symbols is trivial and involves a simple data structure called a pushdown stack. Generating a meaningful palindrome in any of the planets natural languages is a bit tougher. A related problem called a fuzz phrase generator is easy and loads of fun to program and observe. Tell us more about what you had in mind.
thanks for your reply i attended one interview actually the HR asked the question to me. can u tell me how can we assign strings in microprocessor? can we?
 

Papabravo

Joined Feb 24, 2006
21,159
What gets assigned is a pointer to the first character in the string. The length is determined by having an "end" marker like a zero or null character. It is also possible to encode the length of a string in the string data.
 
Top