What is Void Function in C++

The Void Function has prototype like other functions but without data types. The void function does'n return any value. Sometime we don't need to return a value from a function so we used void function. Remember that void is a type which tell the compiler that function return nothing.

Source Code

#include<iostream>
using namespace std;
void LEP ();
int main ()
{
 LEP();
 }
void LEP ()
{
cout<<" \t \t \t LEP \n \n \n ";
cout<<" LEP Provide the Solutions of Many Programming Problem. You May Learn \n";
cout<<"  1. C++  \n ";
cout<<" 2. Java  \n ";
cout<<" 3. Android  \n ";
cout<<" 4. SEO  \n ";
cout<<" 5. Programming Tips  \n ";
cout<<" \t \t \t \t \t \t Thank u!";
}

Output of the Program

Void Function in C++

Share on Google Plus

About Asad

Asad Niazi is Software Engineer , Programmer, Web Developer and a young mentor of BloggersTown and PProgramming. Asad Love to writes about Technology, Programming, Blogging and make money online.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment