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


Please Help Members By Posting Answers For Below Questions

Explain what is a stream?

793


What is dynamic dispatch in c++?

761


Write a code to determine the total number of stops an elevator would take to serve N number of people.

972


Difference between exit() and _exit() function?

886


What are the different types of control structures?

783


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

859


How old is c programming language?

773


What is the difference between malloc calloc and realloc in c?

875


Is sizeof a keyword in c?

751


write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);

2087


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

2935


What is structure pointer in c?

774


What are nested functions in c?

761


Explain the advantages of using macro in c language?

756


When can you use a pointer with a function?

740