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
Differentiate between #include<...> and #include '...'
What is meant by realloc()?
How would you obtain the current time and difference between two times?
the question is that what you have been doing all these periods (one year gap)
What is difference between structure and union?
How to get string length of given string in c?
What is union in c?
What does the error message "DGROUP exceeds 64K" mean?
Are enumerations really portable?
What are the two types of structure?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
What is a c token and types of c tokens?
Is c# a good language?
What is omp_num_threads?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays