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 does do in c?
Tell me the use of bit field in c language?
What is a pragma?
What are Macros? What are its advantages and disadvantages?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
Explain what is meant by high-order and low-order bytes?
When is a “switch” statement preferable over an “if” statement?
Tell me when is a void pointer used?
How can I get the current date or time of day in a c program?
What is #include called?
What is the purpose of scanf() and printf() functions?
Why doesnt the call scanf work?
Explain how do you view the path?
What is .obj file in c?
When the macros gets expanded?