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 text and binary i/o?
can we have joblib in a proc ?
Can we change the value of constant variable in c?
What is the use of linkage in c language?
What do you mean by scope of a variable in c?
What is the difference between array and structure in c?
What do you mean by invalid pointer arithmetic?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
What is the benefit of using an enum rather than a #define constant?
What is function definition in c?
In which language linux is written?
What is the difference between null pointer and wild pointer?
What are local static variables? How can you use them?
writ a program to compare using strcmp VIVA and viva with its output.
Why is c called c not d or e?