+ 1

CAN ANYONE SUGGEST SOLUTION HERE PLS

#include<stdio.h> main() { printf("I am going inside test function now\n"); test(); printf("\nNow I am back from test function\n"); system("pause"); } test() { int a,b; a=1; b=a+100; printf("a is %d and b is %d",a,b); }

1st Mar 2019, 8:44 AM
JIBRILLA ALANJIRO
JIBRILLA ALANJIRO - avatar
2 odpowiedzi
+ 1
You have to declare the function before the point you are gonna call it. test(); int main() { printf("I am going inside test function now\n"); test(); printf("\nNow I am back from test function\n"); system("pause"); } test() { int a,b; a=1; b=a+100; printf("a is %d and b is %d",a,b); }
1st Mar 2019, 9:48 AM
Parsa Gholipout
Parsa Gholipout - avatar
0
First of all there are a lot of errors But if you did not consider that then the answer is : I am going inside test function now a is 1 and b is 101 Now I am back from test function Press any key to continue...
1st Mar 2019, 9:28 AM
Sahil Bhakat
Sahil Bhakat - avatar