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
Explain what is a stream?
What is dynamic dispatch in c++?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
Difference between exit() and _exit() function?
What are the different types of control structures?
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
How old is c programming language?
What is the difference between malloc calloc and realloc in c?
Is sizeof a keyword in c?
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 []);
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
What is structure pointer in c?
What are nested functions in c?
Explain the advantages of using macro in c language?
When can you use a pointer with a function?