Electronics Circuits & Tutorials
Electronics Circuits & Tutorials

Tutorials

     more....

Dictionaries

     more....

Projects
Home > Electronics Tutorials > C Language Tutorial > Statements - return

C Language Programming Library Reference Guide

Statements - return

The return statement causes the current function to terminate. It can return a value to the calling function. A return statement can not appear in a function whose return type is void. If the value returned has a type different from that of the function's return type, then the value is converted. Using the return statement without an expression creates an undefined result. Reaching the } at the end of the function is the same as returning without an expression.

Syntax:

return expression; Examples:
int alice(int x, int y)
 {
  if(x<y)
    return(1);
  else
    return(0);
}
Note: To report broken links or to submit your projects, tutorials please email to Webmaster

Circuits
A B C D
E F G H
I J K L
M N O P
Q R S T
U V W X
Y Z
Discover

     more......

Copyright © 1999-2011 www.hobbyprojects.com  (All rights reserved)