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 are the advantages of Macro over function?
What language is windows 1.0 written?
What is conio h in c?
How can I manipulate strings of multibyte characters?
how can I convert a string to a number?
Why is c not oop?
What is the difference between formatted&unformatted i/o functions?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
What are global variables and how do you declare them?
Define Spanning-Tree Protocol (STP)
explain what are actual arguments?
What is the use of static variable in c?
Why does not c have an exponentiation operator?
What does emoji p mean?
How do you initialize pointer variables?