0
int compare(char *s1,char *s2, int n) { return ...........; }
What is value of return ?
4 Respostas
+ 3
Depends on the condition or requirements of the problem.
or If you're asking about the data type then that should return an integer value because the function is declared as "int" .
+ 2
Abhishek Kumar
As I said, it depends on the challenge or problem. Or if you have your attempt then please show us you code and details of challenge so we my help. Thanks.
0
What will be the value of integer?
0
Below code is
int main(){
char s1[20], s2[20];
int n,r;
cin >> s1 >> s2 >> n;
r = compare(s1,s2,n);
if(r>0)
cout << s1;
else if(r<0)
cout << s2;
else
cout << "equal";
return 0;
}