Program Console Vignaankosh.com
Execution Panel
Console is empty.
Concatenate strings using function is an interactive C dry run visualizer from the 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>
void concatenate(char dest[], char src[]) {
// Find end of destination string
int i = 0;
while(dest[i] != '\0') {
i++;
}
// Copy source string to destination
int j = 0;
while(src[j] != '\0') {
dest[i] = src[j];
i++;
j++;
}
dest[i] = '\0'; // Add null terminator
}
int main() {
char str1[100] = "Hello, ";
char str2[] = "World!";
printf("Before: str1 = \"%s\"\n", str1);
printf("str2 = \"%s\"\n", str2);
concatenate(str1, str2);
printf("After concatenation: \"%s\"\n", str1);
return 0;
}