value = 0xabcd;
for (loop = 1; (value >> 1) & 1 | loop & 1; loop++) {
foo();
if (loop & 1)
value >>= 1;
}
how many times is foo() executed?
Answer Posted / sbay
Shouldn't it be || though?
for (loop = 1; (value >> 1) & 1 || loop & 1; loop++)
????
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the difference between void main and main in c?
Do array subscripts always start with zero?
Is it acceptable to declare/define a variable in a c header?
What is the purpose of 'register' keyword in c language?
How can I find the modification date and time of a file?
What is use of integral promotions in c?
What are the primitive data types in c?
How do you search data in a data file using random access method?
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
Why doesnt long int work?
How can I get back to the interactive keyboard if stdin is redirected?
develop algorithms to add polynomials (i) in one variable
When was c language developed?
please give me some tips for the placement in the TCS.
What is the use of gets and puts?