i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{
k+=j<10?4:3;
}
printf("%d", k);
Answer Posted / abi
all the above answers are wrong!
just think the below logic...
in for loop j=1+4*20 so j=81
81<10 is false...so 3 is assigned
k+=3 ie k=k+3
k=0+3
k=3
so answer is 3
| Is This Answer Correct ? | 15 Yes | 15 No |
Post New Answer View All Answers
What is const keyword in c?
Is boolean a datatype in c?
Why is structure padding done in c?
What is the best way to store flag values in a program?
What is hungarian notation? Is it worthwhile?
write a program to generate address labels using structures?
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)
What is c method?
Explain the priority queues?
Explain how can you check to see whether a symbol is defined?
Explain what is wrong with this program statement?
Explain two-dimensional array.
How to get string length of given string in c?
Explain what are its uses in c programming?