i=20,k=0;
for(j=1;j<i;j=1+4*(i/j))
{
k+=j<10?4:3;
}
printf("%d", k);
Answer Posted / 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 |
Post New Answer View All Answers
What are header files in c?
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
What is the scope of an external variable in c?
What is a node in c?
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
Tell me what is null pointer in c?
What is merge sort in c?
What is pass by reference in c?
What is void main () in c?
Which is better malloc or calloc?
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
Why n++ execute faster than n+1 ?
The difference between printf and fprintf is ?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
cavium networks written test pattern ..