Call By Reference in C.

 #include <stdio.h>


void changevalue(int *address)
{
    *address = 456;
}
int main()
{
    int a = 34, b = 56;
    printf("The value of a now is %d\n", a);
    changevalue(&a);
    printf("The value of a now is %d\n", a);
    return 0;
}

OUTPUT:
The value of a now is 34 The value of a now is 456

Comments

Post a Comment

Popular posts from this blog

C Program using continue statement

C program of WHILE Loop

NULL Pointer in C.

C Program using DO WHILE loop

C Program using SWITCH statement

New Animated Login or signup page made by HTML, CSS and JavaScript.

C Program to print multiplication table of any number.

C Language Travel Agency Manager Exercise.

STRUCTURE IN C PROGRAMMING.