which of the following are violations of Rule 12.6?
Code: Select all
if((x==y)|(y==a))/*Violation?, could || have been meant?*/
{
}
Code: Select all
a=a+y+x+(x||y);
/*Violation, effectively boolean expression used with + operator*/
Code: Select all
int32_t x=5;
int32_t y=11;
if(x||y) /*Could this be a violation??? because x and y are not effectively boolean*/
{
}
Thanks for you help!