What kind of function call is this?

Debojit Acharjee 455 Reputation points
2023-06-13T02:25:23.56+00:00

When a function is called by passing values in the argument, it's called called by value, but what kind of function call is done when no values are passes? What kind of function call can we call it if it's not call by value or reference?

Example:

#include <stdio.h>

int add();
int text();

int main()
{
    int sum;

    sum = add(1, 2);

    text();

    printf("%d\n", sum);

    return 0;
}

int add(int a, int b)
{
    int c;

    c = a + b;

    return c;
}

int text()
{
    printf("Sum of two numbers is ");
}

Output:

Sum of two numbers is 3

In this program the add() function is called by passing values and we can say that it has been called by passing value but what can we call the text() function? How it is called?

Developer technologies C++
Developer technologies Visual Studio Other
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.