Claim your Biolink Click Here
0 like 0 dislike
578 views
in Computers & Internet by | 578 views

1 Answer

0 like 0 dislike
When a division is performed the remainder of the operation is given by modulus operator. The modulus operator is denoted in c by symbol %. Say for instance we have two integer values x and y and then the operation x % y called as x modulus y gives the result as (x- (x / y) * y).  Say if x=23 and y =5 the x % y gives value as (23- (23 / 5) * 5) which gives (23-15) which results in 8 in other words the remainder of the division operation.

 
But there is a restriction in C language while using the modulus operator. There are two types of numerical data types namely integers, floats, double. But modulos operator can operator only on integers and cannot operate on floats or double. If anyone tries to use the modulus operator on floats then the compiler would display error message as ‘Illegal use of Floating Point’.
by

Related questions

0 like 0 dislike
1 answer
2 like 0 dislike
2 answers
asked Jan 11, 2023 in Computers & Internet by Krish (1.1k points) | 74 views
1 like 0 dislike
1 answer
asked Mar 17, 2014 in Education & Reference by Yogi (460 points) | 167 views
1 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
2 answers
1 like 0 dislike
0 answers

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

1,308 questions
1,469 answers
568 comments
4,809 users