Wednesday, April 22, 2020

Call by value in C

  • 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

Function Overloading in C++

https://monitechvenkat1620.blogspot.com Program : #include <iostream> using namespace std; int c(int x, int y) {   return...