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 |
who is first prime minister in india??
Is it better to bitshift a value than to multiply by 2?
What is malloc() function?
1) int main() { unsigned char a = 0; do { printf("%d=%c\n",a,a); a++; }while(a!=0); return 0; } can anyone please explain the explain the output
How can you draw circles in C?
wat are the two methods for swapping two numbers without using temp variable??
What are local static variables?
What is the difference between char a[] = "string"; and char *p = "string"; ?
14 Answers Adobe, Honeywell, TCS,
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
What is an expression?
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
What is c basic?