Skip to content

Instantly share code, notes, and snippets.

@bleaktradition
bleaktradition / palindrom_for
Created June 27, 2018 18:38
checking for palindrom using for or while loop
#include <iostream>
#include <cstring>
int main (int argc, char ** argv) {
char name[] = {"rentne"};
char * a = &name[0]; // set to first letter in name
char * b = &name[sizeof(name)-2]; // set to last letter in name