Programs On Functions Functions – Theory and Programs [Learn to code] What are Functions? Learn syntax for Functions, types of Functions and programs on Functions.Prashant ChaudhariFebruary 5, 2018
Learn C ProgrammingLearn ProgrammingPrograms On FunctionsResources 062. Write a program to calculate square and cube of a given number in C language #include<stdio.h> #include<conio.h> int square(int x) { return(x*x); } int qube(int x) { return(x*x*x); } main()…Prashant ChaudhariSeptember 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On FunctionsResources 061. Write a program to accept a number from user and print it’s factorial, check if it prime or not , and print it’s fibbonacci series using different functions in C language #include<stdio.h> #include<conio.h> fact(int x) { int i,fact=1; for(i=1;i<=x;i++) fact=fact*i; printf("Factorial is : %d",fact); } IsPrime(int x) { int i; for(i=2;i<x-1;i++)…Prashant ChaudhariSeptember 18, 2012
Learn C ProgrammingLearn ProgrammingPrograms On FunctionsResources 060. Write a program to accept two numbers from user and print it’s addition,subtraction,multiplication,division using different functions in C language #include<stdio.h> #include<conio.h> int add(int x,int y) { return(x+y); } int sub(int x,int y) { return(x-y);…Prashant ChaudhariSeptember 18, 2012