Program Console Vignaankosh.com
Execution Panel
Console is empty.
Case-insensitive comparison (custom logic) is an interactive C dry run visualizer from the String Functions programs section. Study the source code, then use the execution controls to follow each step, variable update, highlighted line, and console output.
This page provides a browser-based dry run with source-code highlighting, auto-scroll, voice narration controls, and execution output for learning the program step by step.
#include <stdio.h>
#include <ctype.h>
int strcmp_ignore_case(const char* str1, const char* str2) {
while(*str1 && *str2) {
char c1 = tolower(*str1);
char c2 = tolower(*str2);
if(c1 != c2) {
return c1 - c2;
}
str1++;
str2++;
}
return tolower(*str1) - tolower(*str2);
}
int main() {
char str1[] = "Hello World";
char str2[] = "HELLO world";
char str3[] = "Hello Everyone";
int result = strcmp_ignore_case(str1, str2);
if(result == 0)
printf("\"%s\" and \"%s\" are EQUAL (case-insensitive)\n", str1, str2);
else
printf("Not equal\n");
result = strcmp_ignore_case(str1, str3);
if(result == 0)
printf("Equal\n");
else
printf("\"%s\" and \"%s\" are NOT equal\n", str1, str3);
return 0;
}