Basic Programs
If Else based Programs
Loop Based Programs
Array Based Programs
String Programs
Function Programs
Pointers Programs
Structure & File Handling Programs
Data Structure Programs
Pointer based Programs
call by reference
#include<stdio.h>
#include<conio.h>
void main() { int a=10, b=20; printf("a= %d, b=%d", a,b) ; // a=10, b=20 change(&a,&b); printf("a= %d, b=%d", a,b) ; // a=20, b=40 changed value }
void change(int *a, int *b)
{
*a=(*a)*2;.//change value here
*b=(*b)*2;
}
Output of the above program is as following.
Video/ C Introduction
Watch video in full size