online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, OCaml, VB, Perl, Swift, Prolog, Javascript, Pascal, COBOL, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <stdio.h> #include "string.h" #include <ctype.h> #include <time.h> clock_t start, end; double t1 = 0, t2 = 0; #define chartype unsigned char* strcasestr1 (const char* haystack, const char* needle) { chartype needle_ch = tolower(*needle++); chartype needle_upch = toupper(needle_ch); chartype ch_h; char* match = (char*)haystack; /* if needle empty return haystack */ if (needle_ch != 0) { /* find the first matching character */ do { ch_h = *haystack++; if (ch_h == 0) /* end of haystack no match.. */ return NULL; } while (ch_h != needle_ch && ch_h != needle_upch); match = (char*) haystack - 1; /* find the first non-matching character */ lcase_match: while (ch_h == needle_ch) { ch_h = *haystack++; needle_ch = tolower(*needle++); if (needle_ch == 0) /* end of needle, found match.. */ return match; } /* lcase or ucase match */ needle_upch = toupper(needle_ch); while (ch_h == needle_upch || ch_h == needle_ch) { ch_h = *haystack++; needle_ch = tolower(*needle++); if (needle_ch == 0) /* end of needle, found match.. */ return match; if (ch_h == needle_ch) goto lcase_match; needle_upch = toupper(needle_ch); } match = NULL; } return match; } char* strcasestr2 (const char* phaystack, const char* pneedle) { const unsigned char *haystack, *needle; chartype bl, bu, cl, cu; haystack = (const unsigned char *) phaystack; needle = (const unsigned char *) pneedle; bl = tolower (*needle); if (bl != '\0') { bu = toupper (bl); haystack--;/* possible ANSI violation */ do { cl = *++haystack; if (cl == '\0') goto ret0; } while ((cl != bl) && (cl != bu)); cl = tolower (*++needle); if (cl == '\0') goto foundneedle; cu = toupper (cl); ++needle; goto jin; for (;;) { chartype a; const unsigned char *rhaystack, *rneedle; do { a = *++haystack; if (a == '\0') goto ret0; if ((a == bl) || (a == bu)) break; a = *++haystack; if (a == '\0') goto ret0; shloop: ; } while ((a != bl) && (a != bu)); jin: a = *++haystack; if (a == '\0') goto ret0; if ((a != cl) && (a != cu)) goto shloop; rhaystack = haystack-- + 1; rneedle = needle; a = tolower (*rneedle); if (tolower (*rhaystack) == (int) a) do { if (a == '\0') goto foundneedle; ++rhaystack; a = tolower (*++needle); if (tolower (*rhaystack) != (int) a) break; if (a == '\0') goto foundneedle; ++rhaystack; a = tolower (*++needle); } while (tolower (*rhaystack) == (int) a); needle = rneedle;/* took the register-poor approach */ if (a == '\0') break; } } foundneedle: return (char*) haystack; ret0: return 0; } const char *words[] = { "A bright sunny day", "Chasing dreams in the city", "Dancing in the rain", "Whispers in the night", "Endless possibilities ahead", "Morning coffee vibes", "Golden sunset on the horizon", "Walk along the beach", "The calm before the storm", "Rays of hope shining through", "Stars 1 twinkle in the sky", "Running through the field", "Breezes of freedom", "Sailing on a clear day", "The road less traveled", "Serene moments in nature", "Eyes full of wonder", "Lost in thought", "The echo of laughter", "A journey of a thousand miles", "Magical moments shared", "Laughter fills the air", "The taste of adventure", "A world full of colors", "Dreams that take flight", "Sunsets and palm trees", "The power of imagination", "A walk through history", "Happiness in simple things", "The sound of waves crashing", "Exploring new horizons", "Autumn leaves falling gently", "The world is my canvas", "A moment of peace", "The adventure begins here", "Under the moonlight sky", "Adventures await us", "Whispers of the past", "The scent of fresh rain", "Love and laughter combined", "Chasing the horizon", "Frozen moments in time", "The warmth of the fire", "Stars lighting up the night", "Running towards tomorrow", "The mystery of the unknown", "Snowflakes dance in the air", "Nature's quiet beauty", "The heartbeat of the city", "Dream big, aim high", "Clouds drifting by", "The rhythm of life", "A heart full of dreams", "Whispering winds on a summer day", "Dawn breaks over the mountains", "Where the wild things are", "Every path leads somewhere", "The dance of the seasons", "Pursuit of happiness", "A new dawn is coming", "Sparks of creativity", "Lost in the moment", "A treasure of memories", "Together we are unstoppable", "The beauty of the unknown", "Waves crashing on the shore", "The joy of discovery", "The sky is the limit", "The road to freedom", "A perfect summer day", "The sound of silence", "A breath of fresh air", "A touch of magic", "The joy of being alive", "The road to success", "Every dream begins here", "Dancing with the wind", "The art of possibility", "Where dreams are born", "Wanderlust calling", "Chasing the stars", "The beauty of a new beginning", "A world of endless dreams", "Grace in every step", "Under the endless sky", "Moments that define us", "Where memories are made", "A journey through time", "Exploring hidden treasures", "Magic is everywhere", "Let the adventure begin", "The power of hope", "Magic in the air", "A spark of inspiration", "A peaceful retreat", "The thrill of the chase", "The beauty of nature's song", "Moments frozen in time", "Chasing the sun", "The mystery of life", "Whistling winds through the trees", "The heart of the forest", "Rays of light shining through", "A step into the unknown", "The calm of the night", "Time to reflect", "A sea of possibilities", "Chasing after the wind", "In the arms of nature", "The power of a smile", "Echoes of the past", "The pulse of the city", "The scent of fresh flowers", "Beyond the horizon", "A story yet to be told", "The journey is the reward", "A memory to cherish", "Through the eyes of love", "Let the magic unfold", "The world at your feet", "The joy of the journey", "A place to call home", "With every step, we grow", "Whispers of a new day", "Chasing endless possibilities", "A world full of stories", "A heart open to adventure", "The spirit of discovery", "A chance to start over", "Creating your own path", "The beauty in every step", "A moment to treasure", "A feeling of peace", "The beauty of the simple things", "The call of the wild", "The promise of a new day", "When the world feels right", "Every day is a new adventure", "The world is full of wonder", "A place where dreams come true", "In the light of the moon", "The beauty of nature's art", "A world without limits", "A heart full of wonder", "When the sun sets", "The power of positive energy", "The heart knows the way", "A path to follow", "The world in your hands", "The joy of discovery", "The beauty of a quiet moment", "Life's little pleasures1", "The thrill Of A new Start Life's little Pleasures The Heart Knows The waY", "In the arms of adventure", "A story in every step", "A world of endless possibilities", "Live your best life", "Where the road ends", "the promise of tomorrow", "No match", "apple", "sunshine", "quick fox", "hello world", "beautiful day", "coding", "blue sky", "java script", "open for business", "happy coding", "moonlight", "rainy days", "chocolate", "mountain view", "coffee time", "morning dew", "peaceful", "summer breeze", "winter chill", "cloudy sky", "starry night", "wildflower", "sunrise", "autumn leaves", "drifting clouds", "0", "zero", "1", "one", "2", "two", "3", "three", "4", "four", "5", "five", "6", "six", "7", "seven", "8", "eight", "9", "nine", "10", "ten", "11", "eleven", "12", "twelve", "13", "thirteen", "14", "fourteen", "15", "fifteen", "16", "sixteen", "17", "seventeen", "18", "eighteen", "19", "nineteen", "20", "twenty", "21", "twenty-one", "22", "twenty-two", "23", "twenty-three", "24", "twenty-four", "25", "twenty-five", "26", "twenty-six", "27", "twenty-seven", "28", "twenty-eight", "29", "twenty-nine", "30", "thirty", "31", "thirty-one", "32", "thirty-two", "33", "thirty-three", "34", "thirty-four", "35", "thirty-five", "36", "thirty-six", "37", "thirty-seven", "38", "thirty-eight", "39", "thirty-nine", "40", "forty", "41", "forty-one", "42", "forty-two", "43", "forty-three", "44", "forty-four", "45", "forty-five", "46", "forty-six", "47", "forty-seven", "48", "forty-eight", "49", "forty-nine", "50", "fifty", "51", "fifty-one", "52", "fifty-two", "53", "fifty-three", "54", "fifty-four", "55", "fifty-five", "56", "fifty-six", "57", "fifty-seven", "58", "fifty-eight", "59", "fifty-nine", "60", "sixty", "61", "sixty-one", "62", "sixty-two", "63", "sixty-three", "64", "sixty-four", "65", "sixty-five", "66", "sixty-six", "67", "sixty-seven", "68", "sixty-eight", "69", "sixty-nine", "70", "seventy", "71", "seventy-one", "72", "seventy-two", "73", "seventy-three", "74", "seventy-four", "75", "seventy-five", "76", "seventy-six", "77", "seventy-seven", "78", "seventy-eight", "79", "seventy-nine", "80", "eighty", "81", "eighty-one", "82", "eighty-two", "83", "eighty-three", "84", "eighty-four", "85", "eighty-five", "86", "eighty-six", "87", "eighty-seven", "88", "eighty-eight", "89", "eighty-nine", "90", "ninety", "91", "ninety-one", "92", "ninety-two", "93", "ninety-three", "94", "ninety-four", "95", "ninety-five", "96", "ninety-six", "97", "ninety-seven", "98", "ninety-eight", "99", "ninety-nine", "100", "one hundred", "0x0000", "0x0001", "0x0002", "0x0003", "0x0004", "0x0005", "0x0006", "0x0007", "0x0008", "0x0009", "0x000A", "0x000B", "0x000C", "0x000D", "0x000E", "0x000F", "0x0010", "0x0011", "0x0012", "0x0013", "0x0014", "0x0015", "0x0016", "0x0017", "0x0018", "0x0019", "0x001A", "0x001B", "0x001C", "0x001D", "0x001E", "0x001F", "0x0020", "0x0021", "0x0022", "0x0023", "0x0024", "0x0025", "0x0026", "0x0027", "0x0028", "0x0029", "0x002A", "0x002B", "0x002C", "0x002D", "0x002E", "0x002F", "0x0030", "0x0031", "0x0032", "0x0033", "0x0034", "0x0035", "0x0036", "0x0037", "0x0038", "0x0039", "0x003A", "0x003B", "0x003C", "0x003D", "0x003E", "0x003F", "0x0040", "0x0041", "0x0042", "0x0043", "0x0044", "0x0045", "0x0046", "0x0047", "0x0048", "0x0049", "0x004A", "0x004B", "0x004C", "0x004D", "0x004E", "0x004F", "0x0050", "0x0051", "0x0052", "0x0053", "0x0054", "0x0055", "0x0056", "0x0057", "0x0058", "0x0059", "0x005A", "0x005B", "0x005C", "0x005D", "0x005E", "0x005F", "0x0060", "0x0061", "0x0062", "0x0063", "0x0064", "0x0065", "0x0066", "0x0067", "0x0068", "0x0069", "0x006A", "0x006B", "0x006C", "0x006D", "0x006E", "0x006F", "0x0070", "0x0071", "0x0072", "0x0073", "0x0074", "0x0075", "0x0076", "0x0077", "0x0078", "0x0079", "0x007A", "0x007B", "0x007C", "0x007D", "0x007E", "0x007F", "0x0080", "0x0081", "0x0082", "0x0083", "0x0084", "0x0085", "0x0086", "0x0087", "0x0088", "0x0089", "0x008A", "0x008B", "0x008C", "0x008D", "0x008E", "0x008F", "0x0090", "0x0091", "0x0092", "0x0093", "0x0094", "0x0095", "0x0096", "0x0097", "0x0098", "0x0099", "0x009A", "0x009B", "0x009C", "0x009D", "0x009E", "0x009F", "0x00A0", "0x00A1", "0x00A2", "0x00A3", "0x00A4", "0x00A5", "0x00A6", "0x00A7", "0x00A8", "0x00A9", "0x00AA", "0x00AB", "0x00AC", "0x00AD", "0x00AE", "0x00AF", "0x00B0", "0x00B1", "0x00B2", "0x00B3", "0x00B4", "0x00B5", "0x00B6", "0x00B7", "0x00B8", "0x00B9", "0x00BA", "0x00BB", "0x00BC", "0x00BD", "0x00BE", "0x00BF", "0x00C0", "0x00C1", "0x00C2", "0x00C3", "0x00C4", "0x00C5", "0x00C6", "0x00C7", "0x00C8", "0x00C9", "0x00CA", "0x00CB", "0x00CC", "0x00CD", "0x00CE", "0x00CF", "0x00D0", "0x00D1", "0x00D2", "0x00D3", "0x00D4", "0x00D5", "0x00D6", "0x00D7", "0x00D8", "0x00D9", "0x00DA", "0x00DB", "0x00DC", "0x00DD", "0x00DE", "0x00DF", "0x00E0", "0x00E1", "0x00E2", "0x00E3", "0x00E4", "0x00E5", "0x00E6", "0x00E7", "0x00E8", "0x00E9", "0x00EA", "0x00EB", "0x00EC", "0x00ED", "0x00EE", "0x00EF", "0x00F0", "0x00F1", "0x00F2", "0x00F3", "0x00F4", "0x00F5", "0x00F6", "0x00F7", "0x00F8", "0x00F9", "0x00FA", "0x00FB", "0x00FC", "0x00FD", "0x00FE", "0x00FF", "0x0100", "0x0101", "0x0102", "0x0103", "0x0104", "0x0105", "0x0106", "0x0107", "0x0108", "0x0109", "0x010A", "0x010B", "0x010C", "0x010D", "0x010E", "0x010F", "0x0110", "0x0111", "0x0112", "0x0113", "0x0114", "0x0115", "0x0116", "0x0117", "0x0118", "0x0119", "0x011A", "0x011B", "0x011C", "0x011D", "0x011E", "0x011F", "0x0120", "0x0121", "0x0122", "0x0123", "0x0124", "0x0125", "0x0126", "0x0127", "0x0128", "0x0129", "0x012A", "0x012B", "0x012C", "0x012D", "0x012E", "0x012F", "0x0130", "0x0131", "0x0132", "0x0133", "0x0134", "0x0135", "0x0136", "0x0137", "0x0138", "0x0139", "0x013A", "0x013B", "0x013C", "0x013D", "0x013E", "0x013F", "0x0140", "0x0141", "0x0142", "0x0143", "0x0144", "0x0145", "0x0146", "0x0147", "0x0148", "0x0149", "0x014A", "0x014B", "0x014C", "0x014D", "0x014E", "0x014F", "0x0150", "0x0151", "0x0152", "0x0153", "0x0154", "0x0155", "0x0156", "0x0157", "0x0158", "0x0159", "0x015A", "0x015B", "0x015C", "0x015D", "0x015E", "0x015F", "0x0160", "0x0161", "0x0162", "0x0163", "0x0164", "0x0165", "0x0166", "0x0167", "0x0168", "0x0169", "0x016A", "0x016B", "0x016C", "0x016D", "0x016E", "0x016F", "0x0170", "0x0171", "0x0172", "0x0173", "0x0174", "0x0175", "0x0176", "0x0177", "0x0178", "0x0179", "0x017A", "0x017B", "0x017C", "0x017D", "0x017E", "0x017F", "0x0180", "0x0181", "0x0182", "0x0183", "0x0184", "0x0185", "0x0186", "0x0187", "0x0188", "0x0189", "0x018A", "0x018B", "0x018C", "0x018D", "0x018E", "0x018F", "0x0190", "0x0191", "0x0192", "0x0193", "0x0194", "0x0195", "0x0196", "0x0197", "0x0198", "0x0199", "0x019A", "0x019B", "0x019C", "0x019D", "0x019E", "0x019F", "0x01A0", "0x01A1", "0x01A2", "0x01A3", "0x01A4", "0x01A5", "0x01A6", "0x01A7", "0x01A8", "0x01A9", "0x01AA", "0x01AB", "0x01AC", "0x01AD", "0x01AE", "0x01AF", "0x01B0", "0x01B1", "0x01B2", "0x01B3", "0x01B4", "0x01B5", "0x01B6", "0x01B7", "0x01B8", "0x01B9", "0x01BA", "0x01BB", "0x01BC", "0x01BD", "0x01BE", "0x01BF", "0x01C0", "0x01C1", "0x01C2", "0x01C3", "0x01C4", "0x01C5", "0x01C6", "0x01C7", "0x01C8", "0x01C9", "0x01CA", "0x01CB", "0x01CC", "0x01CD", "0x01CE", "0x01CF", "0x01D0", "0x01D1", "0x01D2", "0x01D3", "0x01D4", "0x01D5", "0x01D6", "0x01D7", "0x01D8", "0x01D9", "0x01DA", "0x01DB", "0x01DC", "0x01DD", "0x01DE", "0x01DF", "0x01E0", "0x01E1", "0x01E2", "0x01E3", "0x01E4", "0x01E5", "0x01E6", "0x01E7", "0x01E8", "0x01E9", "0x01EA", "0x01EB", "0x01EC", "0x01ED", "0x01EE", "0x01EF", "0x01F0", "0x01F1", "0x01F2", "0x01F3", "0x01F4", "0x01F5", "0x01F6", "0x01F7", "0x01F8", "0x01F9", "0x01FA", "0x01FB", "0x01FC", "0x01FD", "0x01FE", "0x01FF", "0x0200", "0x0201", "0x0202", "0x0203", "0x0204", "0x0205", "0x0206", "0x0207", "0x0208", "0x0209", "0x020A", "0x020B", "0x020C", "0x020D", "0x020E", "0x020F", "0x0210", "0x0211", "0x0212", "0x0213", "0x0214", "0x0215", "0x0216", "0x0217", "0x0218", "0x0219", "0x021A", "0x021B", "0x021C", "0x021D", "0x021E", "0x021F", "0x0220", "0x0221", "0x0222", "0x0223", "0x0224", "0x0225", "0x0226", "0x0227", "0x0228", "0x0229", "0x022A", "0x022B", "0x022C", "0x022D", "0x022E", "0x022F", "0x0230", "0x0231", "0x0232", "0x0233", "0x0234", "0x0235", "0x0236", "0x0237", "0x0238", "0x0239", "0x023A", "0x023B", "0x023C", "0x023D", "0x023E", "0x023F", "0x0240", "0x0241", "0x0242", "0x0243", "0x0244", "0x0245", "0x0246", "0x0247", "0x0248", "0x0249", "0x024A", "0x024B", "0x024C", "0x024D", "0x024E", "0x024F", "0x0250", "0x0251", "0x0252", "0x0253", "0x0254", "0x0255", "0x0256", "0x0257", "0x0258", "0x0259", "0x025A", "0x025B", "0x025C", "0x025D", "0x025E", "0x025F", "0x0260", "0x0261", "0x0262", "0x0263", "0x0264", "0x0265", "0x0266", "0x0267", "0x0268", "0x0269", "0x026A", "0x026B", "0x026C", "0x026D", "0x026E", "0x026F", "0x0270", "0x0271", "0x0272", "0x0273", "0x0274", "0x0275", "0x0276", "0x0277", "0x0278", "0x0279", "0x027A", "0x027B", "0x027C", "0x027D", "0x027E", "0x027F", "0x0280", "0x0281", "0x0282", "0x0283", "0x0284", "0x0285", "0x0286","Whole Haystack string" }; const char *case_variants[] = { "A Bright Sunny Day", "Chasing Dreams In The City", "Dancing In The Rain", "Whispers In The Night", "Endless Possibilities Ahead", "Morning Coffee Vibes", "Golden Sunset On The Horizon", "Walk Along The Beach", "The Calm Before The Storm", "Rays Of Hope Shining Through", "Stars 1 Twinkle In The Sky", "Running Through The Field", "Breezes Of Freedom", "Sailing On A Clear Day", "The Road Less Traveled", "Serene Moments In Nature", "Eyes Full Of Wonder", "Lost In Thought", "The Echo Of Laughter", "A Journey Of A Thousand Miles", "Magical Moments Shared", "Laughter Fills The Air", "The Taste Of Adventure", "A World Full Of Colors", "Dreams That Take Flight", "Sunsets And Palm Trees", "The Power Of Imagination", "A Walk Through History", "Happiness In Simple Things", "The Sound Of Waves Crashing", "Exploring New Horizons", "Autumn Leaves Falling Gently", "The World Is My Canvas", "A Moment Of Peace", "The Adventure Begins Here", "Under The Moonlight Sky", "Adventures Await Us", "Whispers Of The Past", "The Scent Of Fresh Rain", "Love And Laughter Combined", "Chasing The Horizon", "Frozen Moments In Time", "The Warmth Of The Fire", "Stars Lighting Up The Night", "Running Towards Tomorrow", "The Mystery Of The Unknown", "Snowflakes Dance In The Air", "Nature's Quiet Beauty", "The Heartbeat Of The City", "Dream Big, Aim High", "Clouds Drifting By", "The Rhythm Of Life", "A Heart Full Of Dreams", "Whispering Winds On A Summer Day", "Dawn Breaks Over The Mountains", "Where The Wild Things Are", "Every Path Leads Somewhere", "The Dance Of The Seasons", "Pursuit Of Happiness", "A New Dawn Is Coming", "Sparks Of", "Lost In The Moment", "A Treasure", "Together We Are Unstoppable", "Beauty Of The Unknown", "Waves Crashing On T", "The Joy Of Discovery", "The Sky Is The Limit", "The Road To Freedom", "A Perfect Summer Day", "The Sound Of Silence", "A Breath Of Fresh Air", "A Touch Of Magic", "The Joy Of Being Alive", "The Road To Success", "Every Dream Begins Here", "Dancing With The Wind", "The Art Of Possibility", "Where Dreams Are Born", "Wanderlust Calling", "Chasing The Stars", "The Beauty Of A New Beginning", "A World Of Endless Dreams", "Grace In Every Step", "Under The Endless Sky", "Moments That Define Us", "Where Memories Are Made", "A Journey Through Time", "Exploring Hidden Treasures", "Magic Is Everywhere", "Let The Adventure Begin", "The Power Of Hope", "Magic In The Air", "A Spark Of Inspiration", "A Peaceful Retreat", "The Thrill Of The Chase", "The Beauty Of Nature's Song", "Moments Frozen In Time", "Chasing The Sun", "The Mystery Of Life", "Whistling Winds Through The Trees", "The Heart Of The Forest", "Rays Of Light Shining Through", "A Step Into The Unknown", "The Calm Of The Night", "Time To Reflect", "A Sea Of Possibilities", "Chasing After The Wind", "In The Arms Of Nature", "The Power Of A Smile", "Echoes Of The Past", "The Pulse Of The City", "The Scent Of Fresh Flowers", "Beyond The Horizon", "A Story Yet To Be Told", "The Journey Is The Reward", "A Memory To Cherish", "Through The Eyes Of Love", "Let The Magic Unfold", "The World At Your Feet", "The Joy Of The Journey", "A Place To Call Home", "With Every Step, We Grow", "Whispers Of A New Day", "Chasing Endless Possibilities", "A World Full Of Stories", "A Heart Open To Adventure", "The Spirit Of Discovery", "A Chance To Start Over", "Creating Your Own Path", "The Beauty In ", "Moment To Treasure", "A Feeling Of Peace", "The Beauty Of The Simple Things", "The Call Of The Wild", "The Promise Of A New Day", "When The World Feels Right", "Every Day Is A New Adventure", "The World Is Full Of Wonder", "A Place Where Dreams Come True", "In The Light Of The Moon", "The Beauty Of Nature's Art", "A World Without Limits", "A Heart Full Of Wonder", "When The Sun Sets", "The Power Of Positive Energy", "The Heart Knows The Way", "A Path To Follow", "The World In Your Hands", "The Joy Of Discovery", "", "Life's Little Pleasures", "The Thrill Of A New Start Life's Little Pleasures The Heart Knows The Way", "In The Arms Of Adventure", "A Story In Every Step", "s", "Live Your Best Life", "Where Road Ends", "the Promise of tomorrow", "random", "Apple", "SunShine", "QuIck FoX", "HeLlO wOrLD", "BeAuTiFuL DaY", "CoDiNg", "BlUe SkY", "JaVa ScRiPt", "OpEn fOr BuSiNeSS", "HaPpY CoDiNg", "MoOnLiGhT", "RaInY dAyS", "ChOcOlAtE", "MoUnTaIn ViEw", "CoFfEe TiMe", "MoRnInG DeW", "PeAcEfUl", "SuMmEr BrEeZe", "WiNtEr ChIlL", "ClOuDy SkY", "StArRy NiGhT", "WiLdFlOwEr", "SuNrIsE", "AuTuMn LeAvEs", "DrIfTiNg ClOuDs", "0", "ZERO", "1", "ONE", "2", "TWO", "3", "THREE", "4", "FOUR", "5", "FIVE", "6", "SIX", "7", "SEVEN", "8", "EIGHT", "9", "NINE", "10", "TEN", "11", "ELEVEN", "12", "TWELVE", "13", "THIRTEEN", "14", "FOURTEEN", "15", "FIFTEEN", "16", "SIXTEEN", "17", "SEVENTEEN", "18", "EIGHTEEN", "19", "NINETEEN", "20", "TWENTY", "21", "TWENTY-ONE", "22", "TWENTY-TWO", "23", "TWENTY-THREE", "24", "TWENTY-FOUR", "25", "TWENTY-FIVE", "26", "TWENTY-SIX", "27", "TWENTY-SEVEN", "28", "TWENTY-EIGHT", "29", "TWENTY-NINE", "30", "THIRTY", "31", "THIRTY-ONE", "32", "THIRTY-TWO", "33", "THIRTY-THREE", "34", "THIRTY-FOUR", "35", "THIRTY-FIVE", "36", "THIRTY-SIX", "37", "THIRTY-SEVEN", "38", "THIRTY-EIGHT", "39", "THIRTY-NINE", "40", "FORTY", "41", "FORTY-ONE", "42", "FORTY-TWO", "43", "FORTY-THREE", "44", "FORTY-FOUR", "45", "FORTY-FIVE", "46", "FORTY-SIX", "47", "FORTY-SEVEN", "48", "FORTY-EIGHT", "49", "FORTY-NINE", "50", "FIFTY", "51", "FIFTY-ONE", "52", "FIFTY-TWO", "53", "FIFTY-THREE", "54", "FIFTY-FOUR", "55", "FIFTY-FIVE", "56", "FIFTY-SIX", "57", "FIFTY-SEVEN", "58", "FIFTY-EIGHT", "59", "FIFTY-NINE", "60", "SIXTY", "61", "SIXTY-ONE", "62", "SIXTY-TWO", "63", "SIXTY-THREE", "64", "SIXTY-FOUR", "65", "SIXTY-FIVE", "66", "SIXTY-SIX", "67", "SIXTY-SEVEN", "68", "SIXTY-EIGHT", "69", "SIXTY-NINE", "70", "SEVENTY", "71", "SEVENTY-ONE", "72", "SEVENTY-TWO", "73", "SEVENTY-THREE", "74", "SEVENTY-FOUR", "75", "SEVENTY-FIVE", "76", "SEVENTY-SIX", "77", "SEVENTY-SEVEN", "78", "SEVENTY-EIGHT", "79", "SEVENTY-NINE", "80", "EIGHTY", "81", "EIGHTY-ONE", "82", "EIGHTY-TWO", "83", "EIGHTY-THREE", "84", "EIGHTY-FOUR", "85", "EIGHTY-FIVE", "86", "EIGHTY-SIX", "87", "EIGHTY-SEVEN", "88", "EIGHTY-EIGHT", "89", "EIGHTY-NINE", "90", "NINETY", "91", "NINETY-ONE", "92", "NINETY-TWO", "93", "NINETY-THREE", "94", "NINETY-FOUR", "95", "NINETY-FIVE", "96", "NINETY-SIX", "97", "NINETY-SEVEN", "98", "NINETY-EIGHT", "99", "NINETY-NINE", "100", "ONE HUNDRED", "0x0000", "0x0001", "0x0002", "0x0003", "0x0004", "0x0005", "0x0006", "0x0007", "0x0008", "0x0009", "0x000a", "0x000b", "0x000c", "0x000d", "0x000e", "0x000f", "0x0010", "0x0011", "0x0012", "0x0013", "0x0014", "0x0015", "0x0016", "0x0017", "0x0018", "0x0019", "0x001a", "0x001b", "0x001c", "0x001d", "0x001e", "0x001f", "0x0020", "0x0021", "0x0022", "0x0023", "0x0024", "0x0025", "0x0026", "0x0027", "0x0028", "0x0029", "0x002a", "0x002b", "0x002c", "0x002d", "0x002e", "0x002f", "0x0030", "0x0031", "0x0032", "0x0033", "0x0034", "0x0035", "0x0036", "0x0037", "0x0038", "0x0039", "0x003a", "0x003b", "0x003c", "0x003d", "0x003e", "0x003f", "0x0040", "0x0041", "0x0042", "0x0043", "0x0044", "0x0045", "0x0046", "0x0047", "0x0048", "0x0049", "0x004a", "0x004b", "0x004c", "0x004d", "0x004e", "0x004f", "0x0050", "0x0051", "0x0052", "0x0053", "0x0054", "0x0055", "0x0056", "0x0057", "0x0058", "0x0059", "0x005a", "0x005b", "0x005c", "0x005d", "0x005e", "0x005f", "0x0060", "0x0061", "0x0062", "0x0063", "0x0064", "0x0065", "0x0066", "0x0067", "0x0068", "0x0069", "0x006a", "0x006b", "0x006c", "0x006d", "0x006e", "0x006f", "0x0070", "0x0071", "0x0072", "0x0073", "0x0074", "0x0075", "0x0076", "0x0077", "0x0078", "0x0079", "0x007a", "0x007b", "0x007c", "0x007d", "0x007e", "0x007f", "0x0080", "0x0081", "0x0082", "0x0083", "0x0084", "0x0085", "0x0086", "0x0087", "0x0088", "0x0089", "0x008a", "0x008b", "0x008c", "0x008d", "0x008e", "0x008f", "0x0090", "0x0091", "0x0092", "0x0093", "0x0094", "0x0095", "0x0096", "0x0097", "0x0098", "0x0099", "0x009a", "0x009b", "0x009c", "0x009d", "0x009e", "0x009f", "0x00a0", "0x00a1", "0x00a2", "0x00a3", "0x00a4", "0x00a5", "0x00a6", "0x00a7", "0x00a8", "0x00a9", "0x00aa", "0x00ab", "0x00ac", "0x00ad", "0x00ae", "0x00af", "0x00b0", "0x00b1", "0x00b2", "0x00b3", "0x00b4", "0x00b5", "0x00b6", "0x00b7", "0x00b8", "0x00b9", "0x00ba", "0x00bb", "0x00bc", "0x00bd", "0x00be", "0x00bf", "0x00c0", "0x00c1", "0x00c2", "0x00c3", "0x00c4", "0x00c5", "0x00c6", "0x00c7", "0x00c8", "0x00c9", "0x00ca", "0x00cb", "0x00cc", "0x00cd", "0x00ce", "0x00cf", "0x00d0", "0x00d1", "0x00d2", "0x00d3", "0x00d4", "0x00d5", "0x00d6", "0x00d7", "0x00d8", "0x00d9", "0x00da", "0x00db", "0x00dc", "0x00dd", "0x00de", "0x00df", "0x00e0", "0x00e1", "0x00e2", "0x00e3", "0x00e4", "0x00e5", "0x00e6", "0x00e7", "0x00e8", "0x00e9", "0x00ea", "0x00eb", "0x00ec", "0x00ed", "0x00ee", "0x00ef", "0x00f0", "0x00f1", "0x00f2", "0x00f3", "0x00f4", "0x00f5", "0x00f6", "0x00f7", "0x00f8", "0x00f9", "0x00fa", "0x00fb", "0x00fc", "0x00fd", "0x00fe", "0x00ff", "0x0100", "0x0101", "0x0102", "0x0103", "0x0104", "0x0105", "0x0106", "0x0107", "0x0108", "0x0109", "0x010a", "0x010b", "0x010c", "0x010d", "0x010e", "0x010f", "0x0110", "0x0111", "0x0112", "0x0113", "0x0114", "0x0115", "0x0116", "0x0117", "0x0118", "0x0119", "0x011a", "0x011b", "0x011c", "0x011d", "0x011e", "0x011f", "0x0120", "0x0121", "0x0122", "0x0123", "0x0124", "0x0125", "0x0126", "0x0127", "0x0128", "0x0129", "0x012a", "0x012b", "0x012c", "0x012d", "0x012e", "0x012f", "0x0130", "0x0131", "0x0132", "0x0133", "0x0134", "0x0135", "0x0136", "0x0137", "0x0138", "0x0139", "0x013a", "0x013b", "0x013c", "0x013d", "0x013e", "0x013f", "0x0140", "0x0141", "0x0142", "0x0143", "0x0144", "0x0145", "0x0146", "0x0147", "0x0148", "0x0149", "0x014a", "0x014b", "0x014c", "0x014d", "0x014e", "0x014f", "0x0150", "0x0151", "0x0152", "0x0153", "0x0154", "0x0155", "0x0156", "0x0157", "0x0158", "0x0159", "0x015a", "0x015b", "0x015c", "0x015d", "0x015e", "0x015f", "0x0160", "0x0161", "0x0162", "0x0163", "0x0164", "0x0165", "0x0166", "0x0167", "0x0168", "0x0169", "0x016a", "0x016b", "0x016c", "0x016d", "0x016e", "0x016f", "0x0170", "0x0171", "0x0172", "0x0173", "0x0174", "0x0175", "0x0176", "0x0177", "0x0178", "0x0179", "0x017a", "0x017b", "0x017c", "0x017d", "0x017e", "0x017f", "0x0180", "0x0181", "0x0182", "0x0183", "0x0184", "0x0185", "0x0186", "0x0187", "0x0188", "0x0189", "0x018a", "0x018b", "0x018c", "0x018d", "0x018e", "0x018f", "0x0190", "0x0191", "0x0192", "0x0193", "0x0194", "0x0195", "0x0196", "0x0197", "0x0198", "0x0199", "0x019a", "0x019b", "0x019c", "0x019d", "0x019e", "0x019f", "0x01a0", "0x01a1", "0x01a2", "0x01a3", "0x01a4", "0x01a5", "0x01a6", "0x01a7", "0x01a8", "0x01a9", "0x01aa", "0x01ab", "0x01ac", "0x01ad", "0x01ae", "0x01af", "0x01b0", "0x01b1", "0x01b2", "0x01b3", "0x01b4", "0x01b5", "0x01b6", "0x01b7", "0x01b8", "0x01b9", "0x01ba", "0x01bb", "0x01bc", "0x01bd", "0x01be", "0x01bf", "0x01c0", "0x01c1", "0x01c2", "0x01c3", "0x01c4", "0x01c5", "0x01c6", "0x01c7", "0x01c8", "0x01c9", "0x01ca", "0x01cb", "0x01cc", "0x01cd", "0x01ce", "0x01cf", "0x01d0", "0x01d1", "0x01d2", "0x01d3", "0x01d4", "0x01d5", "0x01d6", "0x01d7", "0x01d8", "0x01d9", "0x01da", "0x01db", "0x01dc", "0x01dd", "0x01de", "0x01df", "0x01e0", "0x01e1", "0x01e2", "0x01e3", "0x01e4", "0x01e5", "0x01e6", "0x01e7", "0x01e8", "0x01e9", "0x01ea", "0x01eb", "0x01ec", "0x01ed", "0x01ee", "0x01ef", "0x01f0", "0x01f1", "0x01f2", "0x01f3", "0x01f4", "0x01f5", "0x01f6", "0x01f7", "0x01f8", "0x01f9", "0x01fa", "0x01fb", "0x01fc", "0x01fd", "0x01fe", "0x01ff", "0x0200", "0x0201", "0x0202", "0x0203", "0x0204", "0x0205", "0x0206", "0x0207", "0x0208", "0x0209", "0x020a", "0x020b", "0x020c", "0x020d", "0x020e", "0x020f", "0x0210", "0x0211", "0x0212", "0x0213", "0x0214", "0x0215", "0x0216", "0x0217", "0x0218", "0x0219", "0x021a", "0x021b", "0x021c", "0x021d", "0x021e", "0x021f", "0x0220", "0x0221", "0x0222", "0x0223", "0x0224", "0x0225", "0x0226", "0x0227", "0x0228", "0x0229", "0x022a", "0x022b", "0x022c", "0x022d", "0x022e", "0x022f", "0x0230", "0x0231", "0x0232", "0x0233", "0x0234", "0x0235", "0x0236", "0x0237", "0x0238", "0x0239", "0x023a", "0x023b", "0x023c", "0x023d", "0x023e", "0x023f", "0x0240", "0x0241", "0x0242", "0x0243", "0x0244", "0x0245", "0x0246", "0x0247", "0x0248", "0x0249", "0x024a", "0x024b", "0x024c", "0x024d", "0x024e", "0x024f", "0x0250", "0x0251", "0x0252", "0x0253", "0x0254", "0x0255", "0x0256", "0x0257", "0x0258", "0x0259", "0x025a", "0x025b", "0x025c", "0x025d", "0x025e", "0x025f", "0x0260", "0x0261", "0x0262", "0x0263", "0x0264", "0x0265", "0x0266", "0x0267", "0x0268", "0x0269", "0x026a", "0x026b", "0x026c", "0x026d", "0x026e", "0x026f", "0x0270", "0x0271", "0x0272", "0x0273", "0x0274", "0x0275", "0x0276", "0x0277", "0x0278", "0x0279", "0x027a", "0x027b", "0x027c", "0x027d", "0x027e", "0x027f", "0x0280", "0x0281", "0x0282", "0x0283", "0x0284", "0x0285", "0x0286","" }; int main() { int num_words = sizeof(words) / sizeof(words[0]); start = clock(); for (int index = 0; index < 0xFFFF; index++) { int i = index % num_words; if (strcasestr1(words[i], case_variants[i]) != strcasestr2(words[i], case_variants[i])) printf("%s == %s\n %s != %s\n\n", words[i], case_variants[i], strcasestr1(words[i], case_variants[i]), strcasestr2(words[i], case_variants[i]) ); } end = clock(); printf("Run 0 combined %d words %f\n", num_words, ((double) (end - start)) / CLOCKS_PER_SEC); //return 0; start = clock(); for (int index = 0; index < 0xFFFF; index++) { int i = index % num_words; if (strcasestr1(words[i], case_variants[i]) != strcasestr1(words[i], case_variants[i])) printf("%s\n", words[i]); } end = clock(); t1 += ((double) (end - start)) / CLOCKS_PER_SEC; printf("Run 1 %f\n", ((double) (end - start)) / CLOCKS_PER_SEC); start = clock(); for (int index = 0; index < 0xFFFF; index++) { int i = index % num_words; if (strcasestr2(words[i], case_variants[i]) != strcasestr2(words[i], case_variants[i])) printf("%s\n", words[i]); } end = clock(); t2 += ((double) (end - start)) / CLOCKS_PER_SEC; printf("Run 2 %f\n", ((double) (end - start)) / CLOCKS_PER_SEC); start = clock(); for (int index = 0; index < 0xFFFF; index++) { int i = index % num_words; if (strcasestr2(words[i], case_variants[i]) != strcasestr2(words[i], case_variants[i])) printf("%s\n", words[i]); } end = clock(); t2 += ((double) (end - start)) / CLOCKS_PER_SEC; printf("Run 2 %f\n", ((double) (end - start)) / CLOCKS_PER_SEC); start = clock(); for (int index = 0; index < 0xFFFF; index++) { int i = index % num_words; if (strcasestr1(words[i], case_variants[i]) != strcasestr1(words[i], case_variants[i])) printf("%s\n", words[i]); } end = clock(); t1 += ((double) (end - start)) / CLOCKS_PER_SEC; printf("Run 1 %f\n", ((double) (end - start)) / CLOCKS_PER_SEC); start = clock(); for (int index = 0; index < 0xFFFF; index++) { int i = index % num_words; if (strcasestr1(words[i], case_variants[i]) != strcasestr1(words[i], case_variants[i])) printf("%s\n", words[i]); } end = clock(); t1 += ((double) (end - start)) / CLOCKS_PER_SEC; printf("Run 1 %f\n", ((double) (end - start)) / CLOCKS_PER_SEC); start = clock(); for (int index = 0; index < 0xFFFF; index++) { int i = index % num_words; if (strcasestr2(words[i], case_variants[i]) != strcasestr2(words[i], case_variants[i])) printf("%s\n", words[i]); } end = clock(); t2 += ((double) (end - start)) / CLOCKS_PER_SEC; printf("Run 2 %f\n", ((double) (end - start)) / CLOCKS_PER_SEC); start = clock(); for (int index = 0; index < 0xFFFF; index++) { int i = index % num_words; if (strcasestr2(words[i], case_variants[i]) != strcasestr2(words[i], case_variants[i])) printf("%s\n", words[i]); } end = clock(); t2 += ((double) (end - start)) / CLOCKS_PER_SEC; printf("Run 2 %f\n", ((double) (end - start)) / CLOCKS_PER_SEC); start = clock(); for (int index = 0; index < 0xFFFF; index++) { int i = index % num_words; if (strcasestr1(words[i], case_variants[i]) != strcasestr1(words[i], case_variants[i])) printf("%s\n", words[i]); } end = clock(); t1 += ((double) (end - start)) / CLOCKS_PER_SEC; printf("Run 1 %f\n", ((double) (end - start)) / CLOCKS_PER_SEC); printf("Finished:\n R1: %f\n R2: %f\n", t1/4, t2/4); 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