+ 5
What is wrong in this code
int check(int i,int j) { int *p,*q; p=&i; q=&j; i>=45 ?return *p : return *q ; }
7 Respostas
+ 12
You are not suppose to return in conditional statement. Maybe you can try like this
return i>=45? *p : *q;
Also why you are doing like this?
simply do like
return i>=45? i: j;
and remove those 2 pointers
+ 3
but why please elaborate it.
+ 2
u are writing return in conditional operator it is wrong
0
antarastriya beijatti
baap ko sikhayega
0
the last line has no meaning. you should use if statements or inline conditionals. here's the code for inline conditional. (replace the last line with the following) :
return ((i >= 45) ? *p : *q) ;