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 |
When should the const modifier be used?
what is difference between procedural language and functional language ?
regarding pointers concept
List some basic data types in c?
WHAT IS MEANT BY LIFE?
What is meaning of "Void main" in C Language.
24 Answers Ford, GU, HCL, IBIBS, JUW, TCS,
What does the error 'Null Pointer Assignment' mean and what causes this error?
Does c have circular shift operators?
What is the role of && operator in a program code?
void main() { char c; while(c=getchar()!='\n') printf("%d",c); } o/p=11 why?
What is the difference between fread and fwrite function?
an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational