i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{
k+=j<10?4:3;
}
printf("%d", k);
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / suchita
k=5 bcoz the statement k+=j<10?4:3;
here k+ increaments the value then assign to the k
| Is This Answer Correct ? | 1 Yes | 11 No |
How can I recover the file name given an open stream or file descriptor?
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
What is the benefit of using #define to declare a constant?
#include<stdio.h> { printf("Hello"); } how compile time affects when we add additional header file <conio.h>.
write a C program : To find out the number of identical words in two files . the file name should be taken as command line argument .
What is sizeof c?
How was c created?
How many levels of indirection in pointers can you have in a single declaration?
0 Answers Agilent, ZS Associates,
What is c++ used for today?
write a c/c++ program that takes a 5 digit number and calculates 2 power that number and prints it?
What the different types of arrays in c?
biggest of two no's with out using if condition statement