WAP of C Language that illustrates the Function with no arguments and no Return values

Engg.... | 20:02 | | Best Blogger Tips

Functions with no Arguments and no Return values:
The called Function does not receive any data from the calling Function and it does not return any data back to the calling Function. Hence, there is no data transfer between the calling Function and called Function. So, let us understand this with the help of Program:

Statement of C Program: This Program illustrates the Function with no Arguments and no Return value:
#include<stdio.h>
#include<conio.h>
void main()
{
read_value();
}
read_value()
{
char name[10];
printf(" Enter your name\n");
scanf("%s" , name);
printf(" Your name is %s , name);
}

Output:
Enter your name
shubham
Your name is shubham

                                                                  That's All
Please Share it! :)
Do you like this Story?

Get Free Email Updates Daily!

Follow us!

4 comments:

  1. Sorry But this program will not Run ,I also dont know the answere .I am searching for that.but it will show Some warning and Error

    ReplyDelete
    Replies
    1. Yup coz if conio is definef then there will b getch

      Delete
  2. #include
    #include
    void main()
    {
    void read();
    read();
    }
    void read()
    {
    char name[10];
    printf(" Enter your name\n");
    scanf("%s" , name);
    printf(" Your name is %s ", name);
    getch();
    }

    ReplyDelete
  3. 1- Trace the following code
    #include
    int x, y;
    void Test1(int x, int y);
    int Test2(int a, int b);
    void main()
    {
    int a, b, z;
    x=a=10; y=b=20;
    Test1(a, b);
    printf("x=%d , y=%d\n", x, y);
    printf("a=%d , b=%d\n", a, b);
    z = Test2(x, y);
    printf("x=%d , y=%d\n",x, y);
    printf("a=%d , b=%d\n",a, b);
    }
    void Test1(int x, int y)
    {
    int z;
    z=x++ - y--;
    x+=z;
    y-=z;
    printf("x=%d , y=%d\n", x, y);
    }
    int Test2(int a, int b)
    {
    x=a++;
    y=b++;
    printf("x=%d , y=%d\n", x, y);
    printf("a=%d , b=%d\n", a, b);
    return(a+b);
    }

    ReplyDelete