Wikipedia:

div

(C)


div is a function in C programming language that takes two integers as parameters and returns the result of a division between them. It is specified in ANSI-C, and is included from the stdlib.h header when used.

div has a prototype as follows:

div_t div (int numerator, int denominator)

The return value, div_t is a special datatype which is specifically used in storing the results of this function. It is defined as follows:

typedef struct {
  int quot;
  int rem;
} div_t;

Where quot stores the quotient and rem stores the remainder.


 
 
 

Join the WikiAnswers Q&A community. Post a question or answer questions about "div" at WikiAnswers.

 

Copyrights:

Wikipedia. This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Div (C)" Read more

Search for answers directly from your browser with the FREE Answers.com Toolbar!  
Click here to download now. 

Get Answers your way! Check out all our free tools and products.

On this page:   E-mail   print Print  Link  

 

Keep Reading

Mentioned In: