Return Statement in C Language

Return Statement in C Language:

The return statement terminates the execution of a function and returns control to the calling function. Execution resumes in the calling function at the point immediately following the call. A return statement can also return a value to the calling function. A return statement causes your function to exit and hand back a value to its caller. The point of functions, in general, is to take in inputs and return something. The return statement is used when a function is ready to return a value to its caller.

How Does the Return Statement Work in C language?
Return Statement in C Language with Examples

Syntax: return (expression);

Program to Understand Return Statement in C Language:
#include <stdio.h>
void print() // void method
    printf("Return Statement");
int main() // Driver method
    print(); // Calling print
    return 0;
Output: Return Statement
Follow Us On