21
edits
Changes
→To Do
=== To Do===
<pre>
bool validMonth(int mon, char* errmes){
bool res = false;
if(mon > 0 && mon <=12){
res = true;
}
else{
strcpy(errmes, "Invalid month (1<=month<=12)");
}
return res;
}
</pre>
write the above function in one line:
<pre>
bool validMonth(int mon, char* errmes){
return yada yada;
}
</pre>
''yada yada'' can have only operators and one function call (no ?: operator allowed)
*Challenging question answer
**Here is my [http://goop344.blogspot.com/2012/02/todays-first-challenging-question-ans.html Answer].--[[User:Gdanish|Gdanish]] 12:16, 9 February 2012 (EST)