online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> #include <string.h> int main() { char text[100]; int begin, middle, end, length = 0; printf("\nEnter a string: "); //get user str8ing gets(text); //caculatye lenth of entered text until it is '\0' while ( text[length] != '\0' ) { length++; } // end of string is length -1 end = length - 1; //get mid number of total length middle = length/2; //now loop from starting until middle for ( begin = 0 ; begin < middle ; begin++ ) { //check if string from right hand side is same as left hand side //if not, number is not palindrom, otherwise continue if ( text[begin] != text[end] ) { printf("%s is NOT a palindrome.\n", text); break; } end--; } if( begin == middle ) { printf("%s is Palindrome.\n", text); } return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue