Computer Science, asked by rajesh420, 1 year ago

a function should always start with an ---

Answers

Answered by jeevasoonias
5
A function should always start with
main ( )
the simple format for a program is :-
#include<studio.h>
main ( )
{
int x,y,z,sum ;
printf("enter the values \n"); ( HERE "\n" Means new line )
scanf("%d%d%d", &x,&y,&z);
sum=x+y+z
printf("sum=%d",sum);
getch( )
}

THE ABOVE GIVEN PROGRAM IS TO FIND THE SUM OF THREE NO.s
Answered by Anonymous
2

A function should always start with its declaration.

  • All the possible scenarios are listed below for how a function is created.
  • Declaration means the prototype or just initializing the function.
  • Definition is the instruction code that the function is supposed to do.
  • Calling is the process to use that piece of code whereever that function is required for its services.

  • declaration()

        definition()

        calling()

  • declaration()

       calling()

       definition()

  • definition()

        calling()

       

Similar questions