Scroll Down to See All
abortabsacosasctimeasctime_rasinassertatanatan2atexitatofatoiatolbsearchbtowccalloccatclosecatgetscatopenceilclearerrclockcoscoshctimectime_rdifftimediverferfcexitexpfabsfclosefdopenfeofferrorfflushfgetcfgetposfgetsfgetwcfgetwsfopenfprintffputcfputwsfreadfreefreopenfrexpfscanffseekfsetposftellfwidefwprintffwritefwscanfgetcgetchargetenvgetwcgetwchargmtimegmtime_rhypotisalnumisalphaisasciiisblankiscntrlisdigitisgraphislowerisprintispunctisspaceisupperiswalnumiswalphaiswblankiswcntrliswctypeiswdigitiswgraphiswloweriswprintiswpunctiswspaceiswupperiswxdigitisxdigitj0j1jnlabsldexplocaleconvlocaltimelocaltime_rloglog10longjmpmallocmblenmbrlenmbrtowcmbsinitmbsrtowcsmbstowcsmbtowcmemchrmemcmpmemcpymemmovememsetmktimemodfnextafternextafterlnexttowardnexttowardlnl_langinfoperrorpowprintfputcputcharputenvputsputwcputwcharqsortquantexpd32quantexpd64quantexpd128quantized32quantized64quantized128samequantumd32raiserandrand_rreallocregcompregerrorregexecregfreeremoverenamerewindscanfsetbufsetjmpsetlocalesetvbufsignalsinsinhsnprintfsprintfsqrtsrandsscanfstrcasecmpstrcatstrchrstrcmpstrcollstrcpystrcspnstrerrorstrfmonstrftimestrlenstrncasecmpstrncatstrncmpstrncpystrpbrkstrptimestrrchrstrspnstrstrstrtodstrtod32strtod64strtod128strtofstrtokstrtok_rstrtolstrtoldstrtoulstrxfrmswprintfswscanfsystemtantanhtimetime64tmpfiletmpnamtoasciitolowertouppertowctranstowlowertowupperungetcungetwcva_argva_copyva_endva_startvfprintfvfscanfvfwprintfvfwscanfvprintfvscanfvsprintfvsnprintfvsscanfvswprintfvswscanfvwprintfvwscanfwcrtombwcscatwcschrwcscmpwcscollwcscpywcscpywcsftimewcslenwcsncatwcsncmpwcsncpywcspbrkwcsptimewcsrchrwcsrtombswcsspnwcsstrwcstodwcstod32wcstod64wcstod128wcstofwcstokwcstolwcstoldwcstombswcstoulwcsxfrmwctobwctombwctranswctypewcwidthwmemchrwmemcmpwmemcpywmemmovewmemsetwprintfwscanfy0y1yn



Function Details : ldiv

ldiv_tldiv(long int numer,long int denom) ;

Return Type : ldiv_t

A structure type returned by the `ldiv` function, containing two members: `quot` (the quotient) and `rem` (the remainder) of a long integer division.
Read about return values of ldiv function .

1st Parameter Type : long int

Integer type typically larger than `int`, used for storing large numeric values (platform-dependent size, commonly 4 or 8 bytes).

1st Parameter

The numerator of the division operation.

2nd Parameter Type : long int

Integer type typically larger than `int`, used for storing large numeric values (platform-dependent size, commonly 4 or 8 bytes).

2nd Parameter

The denominator of the division operation.

Read more about parameters of ldiv in parameters section
The ldivfunction in C language Divides two long integers and returns the quotient and remainder.
The ldiv function computes the quotient and remainder of the division of the numerator numer by the denominator denom. The result is returned as a structure of type ldiv_t, which contains two long int members named quot (the quotient) and rem (the remainder).
The ldivfunction takes 2 parameters:
  • long int `numer`: The numerator of the division operation.
  • long int `denom`: The denominator of the division operation.
Performs integer division of `numer` by `denom` using `long int` values. Returns a structure of type `ldiv_t` containing two members: `quot` (the quotient) and `rem` (the remainder). This function ensures efficient computation of both the quotient and remainder in a single operation.
The ldiv function return value :
  • Returns a structure of type ldiv_t containing the quotient and remainder

Output

This example demonstrates basic usage of ldiv function to divide two long integers.