What is the modulus operator?



What is the modulus operator?..

Answer / Dineshkumar

The modulus operator (%) in C returns the remainder of a division operation. For example: if 17 % 5 equals 2, it means that when you divide 17 by 5, the remainder is 2.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

21. #define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }

3 Answers  


what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

1 Answers  


Differentiate between declaring a variable and defining a variable?

1 Answers  


program to locate string with in a string with using strstr function

2 Answers   Huawei, Shreyas,


If I have a char * variable pointing to the name of a function ..

1 Answers  


Write a function in c to find the area of a triangle whose length of three sides is given.

2 Answers  


Can a variable be both const and volatile?

1 Answers  


1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

3 Answers  


Can you please explain the difference between strcpy() and memcpy() function?

1 Answers  


What is volatile in c language?

2 Answers   HCL, TCS,


who is the father of c

4 Answers   Infosys,


write a program to find a given no. is divisible by 3 or not without using any arthimetic operators?

3 Answers   Broadcom, TCS,


Categories