answersLogoWhite

0

bool is_palindrome (char* str) {

if (str==0) return false;

int len = strlen (str);

if (len==0) return false;

int len2 = 0;

char* str2 = malloc (len + 1);

char* begin;

char* end;

char c;

for (int i=0; i<len; ++i) {

c = tolower (str[i]);

if ((c>='a' c<='z') (c>='0' c<='9')) str2[len2++] = c;

}

begin = str2;

end = begin+len2-1;

while ((*begin==*end) && (begin<end)) { ++begin; --end; }

free str2;

result = end<=begin;

}

User Avatar

Wiki User

7y ago

What else can I help you with?

Related Questions

Code for creating pascal's triangle in C programming language?

code for creating pascal's triangle in C programming language?


Getting source code of c?

C is a programming language, so it doesn't have source code.(On the other hand, C compilers do have source code, but you, as a beginner in programming, could not understand them.)


Where can one find C programming tutorials?

You can find C programming tutorials online at the C programming website. They provide both free and paid tutorials for many aspects of the C and C++ code.


What does generic programming in c plus plus means?

Generic programming means that the code is generic enough that it compile on any C++ implementation. That is, it has no platform-specific code.


What is c and why you use?

C is a programming language, and it's mostly used for Systems Programming. Most kernels these days have at least some C code in them.


Microsoft office's source code written by which programming language?

C++


How Create mouse in C programming source code?

Here is the article for Mouse programming in C. In this link full details are given nicely.http://electrofriends.com/articles/computer-science/c-tutorials/mouse-programming-in-cc/


What is programming languages in c plus plus?

Programming in C++ means designing and writing a computer program using the C++ programming language. C++ is a high-level, machine-independent language which must be converted into machine-dependent code by a compiler.


What is Turbo C download used for?

Turbo C is a compiler for a general purpose computer programming language called C. It transforms code written in C into the computer language needed for executable programming.


C programming source code for push down automata?

i cant sorry


What do you mean by c taken programming in c?

A C program is a computer program written using the C programming language.


What is the role of a compiler in computer programming and how does it translate high-level programming languages into machine code?

A compiler is a software tool that translates high-level programming languages, like Java or C, into machine code that a computer can understand and execute. It does this by analyzing the code, checking for errors, and converting it into a series of instructions that the computer's processor can directly execute. This process is called compilation, and it allows programmers to write code in a more human-readable format while still being able to run it on a computer.