How would I write this function in C programming language?
Function header: int input(int *a, int *b, int *c)
This function should attempt to input 3 integers from the keyboard and store them in the memory locations pointed to by a, b, and c. The input may not be successful in reading all three values. The function should return the number of values that were successfully read.
#include <stdio.h>
int input(int *a,int *b,int *c){
//scanf will return number of successfull reads
return scanf("%d %d %d",a,b,c);
}
int main(){
int a,b,c;
printf("%d",input(&a,&b,&c));
}
Note : Please comment below if you have concerns. I am here to help you
If you like my answer please rate and help me it is very Imp for me
Get Answers For Free
Most questions answered within 1 hours.