C Program - Call by Value



#include <stdio.h>
#include <conio.h>

void call_by_value(int x)
{
    printf("Inside call_by_value x = %d before adding 10.\n", x);
    x += 10;
    printf("Inside call_by_value x = %d after adding 10.\n", x);
}

int main()
{
    int a=10;

    printf("a = %d before function call_by_value.\n", a);
    call_by_value(a);
    printf("a = %d after function call_by_value.\n", a);
    getch();
    return 0;
}

Output
-------------

Comments

Popular posts from this blog

Introduction to C++ Programming Language

The Assembly Process Of 8086 Microprocessor-Two Pass Assembling Steps

Installing 8086 Assembler on a Computer