1 votes 1 votes Consider the following C program using function : #include<stdio.h> main() { int f1(int,int); int x = 9, n=3, S; S = f1(x,n); printf(S); } int f1(int x, int n) { int y=1, i=1; for(i=1;i<=n;i++) y=y*x; return(y); } Output will be ______ Programming in C tbb-programming-2 numerical-answers + – Bikram asked May 14, 2017 • edited Aug 11, 2017 by Bikram Bikram 276 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes y=9, y=9*9=81, y=81*9=729 ; 729 is the answer Bikram answered May 14, 2017 Bikram comment Share Follow See all 2 Comments See all 2 2 Comments reply Ashwin Kulkarni commented Oct 29, 2017 reply Follow Share @Bikram Sir what about prototyping of f1 function ? Is it allowed in main() ? 0 votes 0 votes Satyajeet Singh commented Jan 11, 2018 reply Follow Share Yes we can provide the prototyping in main() also .. the only condition is that it must occur before the function call... e.g. int main(){ void foo(int); foo(1); return 0; } void foo(int n){ printf("%d", n); } 1 votes 1 votes Please log in or register to add a comment.