Detailed Discription of Category of Functions with Examples

Category of Functions

Category of Functions:
We have some other type of Functions where arguments and return value may be present or absent. Such functions can be categorised into:
  1. Function with arguments but no return value.
  2. Function with no arguments and return value.
  3. Functions with no arguments and no return values

So Let's have a look on Category of Functions one by one:

1. Function with Arguments but no return value: 
Here the called Function recieves the data from the calling function but the called function does not return any value back to the calling Function.So, let us understand with the help of Program:

Statement of C Program: This Program illustrates the Function with arguments but no return value:

#include<stdio.h>
#include<conio.h>
void main()
{
int a, b;
printf(" Enter the value of a and b\n");
scanf("%d%d" , &a ,&b);
largest(a, b);
}

/* Function to compute largest */

largest(c, d)
int c, d;
{
if(c>d)
{
printf(" Largest = %d\n");
}
else                                                    /* (c<d) */
{
printf(" Largest = %d\n");
}
return();
}

Output:
Enter the values of a and b
20
15
Largest = 20

                                     Function with no Arguments and Return Values                                

                                  Functions with no Arguments and no Return Values                             

0 Response to "Detailed Discription of Category of Functions with Examples"

Post a Comment

Popular Posts

Label

1 Sidebar 2 Columns 3 Columns Footer 3rdball 4 Columns Footer Alex Alvaro Antsasia Arlinadesign Averie Barry BASIC CONCEPTS Basil Bayna Fast BeautyPress BeautyTemplates Beckel Best Best - Clean Beyonce Pro BioMag BlackMag Blanter Nova Blogger Card Bloggertheme9 Blogish Bpress Brakt C LANGUAGE C PROGRAMS C++ LANGUAGE C++ PROGRAMS Carella Cellar Charlotte Chooko Lite Clara Clean Combo One Cooperate Crusade Darry Dorman Dreamway Dunia Blanter eCars EduAcademy EducationPress Elise Elvan Eva Everyday FabNews Fashion Fashion Blogger Template Fashion Gossip FastCars Fedo FlashNews Fredy Portfolio Gaming Globus GoodTime Goomsite HTML LANGUAGE iGaming Indicate Innove Insomnia InspiredNews iSoft Jasmine Kalem Landscaping Lashira Lavelle Lily Fashion Limax Linea Lionex Luminescence Lite Lumix Luxury Magazine MagazinePro MAJOR DIFFERENCES MarketingBlog Martin MaxiMag Medica Mega Melissa Mercury MeshMag Minimag Minimalist MiniNews MovieKhor msdesignbd MusicLand Neko NetZine New Spread News16 Newsflash NewsForce NewsIdea Newspaper News NewsPro Nubie Fast Odd Themes Optima PaperMag PaperMag blog Parhlo Perfection Personal Personal Blog Photosout PixelZ Power Blog Premium Themes ProfileMag Purez Rano ReadNews Real estate Remito Grid Responsive Revo Robusta Rotario Saara SeoBoost Settle Shouters Simple Catch SimpleClean Sketchly SNews SolidMag Someo Sophie Sora Sora Bank Sora Home Sora News Responsive Sora One Sora Ribbon Spido Sticko Stucco Sure Mag Swift Tech Tech Pro Techia Techmax TechSpot TemplateClue Templateism Templatesilk Templatesyard Templatezy The Freelancer TheBlogger TheFocus Themeforest Themexpose TIPS AND TRICKS Topside TravelMag Trendy Trendy Travel Tumblr Under Construction Uong Jowo Veethemes Vertox VideoPlay Vigo Waverly way2themes WebBiz Wedding X-Mag Zealer ZetaMag