- Flowchart :
- Program :
#include<stdio.h>
#include<conio.h>
int increment(int var)
{
var = var+1;
return var;
}
void main()
{
int num1=20;
int num2 = increment(num1);
clrscr();
printf("\n----------------CALL BY VALUE----------------");
printf("num1 value is: %d", num1);
printf("\nnum2 value is: %d", num2);
getch();
}
- Output :
No comments:
Post a Comment