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 header file in c?
How is pointer initialized in c?
What is integer constants?
How is = symbol different from == symbol in c programming?
Write a code to remove duplicates in a string.
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
Can we declare a function inside a function in c?
What the advantages of using Unions?
What is include directive in c?
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
Why do we write return 0 in c?
how logic is used
Why do we use return in c?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
How many types of arrays are there in c?