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 5 types of organizational structures?
Explain how can I right-justify a string?
Why does this code crash?
What is c system32 taskhostw exe?
Explain what are multidimensional arrays?
How can I read/write structures from/to data files?
Does * p ++ increment p or what it points to?
Where local variables are stored in c?
please send me the code for multiplying sparse matrix using c
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
What is modeling?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Define and explain about ! Operator?
What is a newline escape sequence?
What is a spanning Tree?