0

Can anybody explain why this code will not run?

C language https://code.sololearn.com/cVS8MJKz2X31/?ref=app

21st Nov 2022, 2:57 PM
clavel skie
clavel skie - avatar
1 Answer
+ 4
#include <stdio.h> int a, b, c; // if you dont provide function prototype , then add function defination before using.. void small(int x, int y, int z) // must provide return type for all functions.. { x=x+1; y=y+1; z=z+1; printf("%d%d%d\n",x,y,z); } void medium(int *x, int *y, int *z) { *x=*x+1; *y=*y+1; *z=*z+1; } void large(int *x, int *y, int *z) { *x=*x+1; *y=*y+1; *z=*z+1; printf("%d%d%d\n",*x,*y,*z); small(*z,*x,*y); } int main() // must provide return type { //clrscr(); // dont work here a=1; b=2; c=3; printf("%d%d%d\n",a,b,c); small(a,b,c); printf("%d%d%d\n",a,b,c); medium(&c,&b,&a); printf("%d%d%d\n",a,b,c); large(&b,&c,&a); printf("%d%d%d\n",a,b,c); large(&b,&c,&a); printf("%d%d%d\n",a,b,c); //getch(); // dont work , deprecated }
21st Nov 2022, 3:14 PM
Jayakrishna 🇼🇳