Question: What will be printed out if the following code snippet is executed ( assume all of the includes and function prototypes are in - place

What will be printed out if the following code snippet is executed (assume all of the includes and function prototypes are in-place):
#include
#include
void add(int num1, int num2, int* result);
int main(){
int number1=3;
int number2=7;
int sum =0;
add(number1,number2, &sum);
printf("%d
", sum);
return(0);
}
void add(int num1, int num2, int* result){
*result = num1+ num2;
}
nothing
10
0
there will be an error

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!