Pass string to function and print it Dry Run in C

Pass string to function and print it 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.

Pass string to function and print it Program Code

#include <stdio.h>

void printString(char str[]) {
    printf("String: %s\n", str);
}

int main() {
    char message1[] = "Hello, C Programming!";
    char message2[] = "Welcome to functions";
    
    printString(message1);
    printString(message2);
    return 0;
}

View the complete Functions programs page.

Program Console Pass string to function and print it Topic: C Vignaankosh.com
Execution Panel
Step 0/0
Console is empty.