why division operator not work in case of float constant?
Answer Posted / vignesh1988i
wat i think is that , when we manipulate floating point
numbers with the same or integers , the resulting should be
float implicitly ... but when we divide any number (floating
or int) the remainder will be in INTEGER only implicitly...
so as defined in compiler numbers with float , if
manipulated gives float implicitly..... but in % operator
that will be made false... that's why i think that is not
allowed!!!!!!!!!!!
thank u
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
Can the “if” function be used in comparing strings?
Why is c fast?
What is difference between main and void main?
Explain what will the preprocessor do for a program?
What is the c language function prototype?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
What's a good way to check for "close enough" floating-point equality?
What is printf () in c?
What is the use of putchar function?
What is multidimensional arrays
What is the purpose of & in scanf?
Explain what is the general form of a c program?
What is the purpose of realloc()?
Do pointers take up memory?