functions3

 // 3. without arguments with return value

#include <stdio.h>
int takenumber();
int main()
{
    int a;
    a=takenumber();
    printf("the number entered is %d",a);
    return 0;
}
int takenumber()
{
    int i;
    printf("enter a number:");
    scanf("%d",&i);
    return i;
}

Comments

Popular posts from this blog

Tokens in C

Steps taken by a compiler to execute a C program

Variables and Data Types in C