100% prog to add numbers using functions

/*in this program we need not write function prototyping as we are directly defining the function in advance to the main()*/
#include<stdio.h>
void kooDu(int u,int a)
{
    int addition;
    addition=u+a;
    printf("\n sum of the given numbers=%d as printed in called function",addition);
  }
void main()
{
    int p,q;
    printf("\n enter 2 integers: ");
    scanf("%d%d",&p,&q);
    kooDu(p,q);//call by value
}

ఔట్పుట్ తెరమీద 


enter 2 integers: 2 5
sum of the given numbers=7 as printed in called function

కామెంట్‌లు

ఈ బ్లాగ్ నుండి ప్రసిద్ధ పోస్ట్‌లు

100% C prog to write content into a file and then read it back onto the console

Spic macay

శ్రీరస్తు.. రామలింగ 18-1-24 (సూరసాని వారి ఆహ్వానము)