Program Console Vignaankosh.com
Execution Panel
Console is empty.
Compare Strings (without strcmp) is an interactive C dry run visualizer from the Strings 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>
int main() {
char str1[] = "hello";
char str2[] = "hello";
int i = 0, equal = 1;
while(str1[i] != '\0' || str2[i] != '\0') {
if(str1[i] != str2[i]) {
equal = 0;
break;
}
i++;
}
if(equal && str1[i] == str2[i])
printf("Strings are EQUAL\n");
else
printf("Strings are NOT equal\n");
return 0;
}