RETURN TYPE WITHOUT PARAMETERS

#include<stdio.h>
#include<conio.h>
//return type without parametrs
int sq(); //declaration
void main()
{
int r;
clrscr();
/*return value accept
by the calling parts*/
r=sq();
printf("\nSQUARE = %d",r);
getch();
}

//defination
int sq()
{
int n,r;
printf("\nENTER ANY NUMBER : ");
scanf("%d",&n);
r=n*n;
return(r);

}

No comments:

Post a Comment

Programmingway@Eklavya Technosys!: JTET 2026 | Computer Sections Solutions | Paper -II

Programmingway@Eklavya Technosys!: JTET 2026 | Computer Sections Solutions | Paper -II :   1) Which of the following is the extension of Not...