filmov
tv
C program tutorial write a program to add two numbers using FUNCTION

Показать описание
Here is an example of a simple function in C that takes two integers as input and returns their sum:
In this example, the function add is defined to take two int arguments x and y, and return an int value, which is the sum of the two arguments. The function is called in the main function, with the values 3 and 4 as arguments. The returned value is then stored in the variable result, and printed to the screen.
In this example, the function add is defined to take two int arguments x and y, and return an int value, which is the sum of the two arguments. The function is called in the main function, with the values 3 and 4 as arguments. The returned value is then stored in the variable result, and printed to the screen.