Div (C)

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 always rounds towards 0, unlike ordinary integer division in C, where rounding for negative numbers is implementation-dependent.

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.

ldiv and lldiv are similar functions that divide integers of type long and long long, respectively; and return a structure of type ldiv_t and lldiv_t, respectively.ldiv_t ldiv (long numerator, long denominator );lldiv_t lldiv (long long numerator, long long denominator);


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • div — div·er; div·i·dend; div·il; div·i·na·tion; div·i·na·tor; div·i·ni·za·tion; div·i·nize; div·ot; div·vers; mer·div·o·rous; mun·div·a·gant; plov·div; sky·div·ing; div; div·vy; mal·div·i·an; khe·div·al; khe·div·ate; …   English syllables

  • Div — or DIV may refer to: Division (disambiguation) <div>, an HTML tag that implements a generic block level element division, the mathematical operation that is the inverse of multiplication div(), a function in the C programming language that… …   Wikipedia

  • DIV — Saltar a navegación, búsqueda DIV Games Studio es un lenguaje de programación basado enteramente en el lenguaje de programación C, nacido en un principio para la creación de juegos en MS DOS. Fue creado por la empresa española Hammer… …   Wikipedia Español

  • Div — Div: Дивергенция Div (англ. division раздел) блочный тег в языке разметки html. Позволяет выделить в структуре документа несколько разделов. div в языке С функция для получения частного и остатка. div в языке Assembler для машин с… …   Википедия

  • Div — Div/​Share Div/​Share FINANCE written abbreviation for dividend per share * * * div ► FINANCE WRITTEN ABBREVIATION for DIVIDEND(Cf. ↑dividend) ► …   Financial and business terms

  • div — dȉv m <N mn dìvovi/ i jez. knjiž.> DEFINICIJA 1. mit. a. zao duh, kreatura b. ljudsko biće nadnaravne veličine i snage; džin, gigant, gorostas, kolos 2. pren. neobično jak i velik čovjek 3. (mn) astron. zvijezde velikih promjera (10 do 100… …   Hrvatski jezični portal

  • DIV — steht für: Deutscher Industrie Verband Deutscher Inline Skate Verband e. V. div steht für: Deutscher Instituts Verlag einen HTML Tag, der einen Block/Bereich (division) kennzeichnet, siehe Tag (Informatik) einen mathematischen Operator für… …   Deutsch Wikipedia

  • Div — steht für: Deutscher Industrie Verband, Deutscher Inline Skate Verband e.V. div steht für: Deutscher Instituts Verlag einen HTML Tag, der einen Block/Bereich (division) kennzeichnet; siehe Tag (Informatik) einen mathematischen Operator für die… …   Deutsch Wikipedia

  • DIV — Games Studio es un lenguaje de programación con estructuras similares al C nacido en un principio para la creación de juegos en MS DOS. Existen dos paquetes distribuidos: DIV y DIV2. DIV2 supera en algunos aspectos a su antecesor. Dichas… …   Enciclopedia Universal

  • Div. — Div. n also Div BrE the written abbreviation of division …   Dictionary of contemporary English

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”