starderg.aich

cock _ 1 see prograaming bhasha key see maanak pustakalaya mein ack header haye joe karyon koo anishchit sankhya mein tarkon koo sweekaar karane kii anumati detaa haye. yeh agyaat sankhya aur prakaar key kaary tarkon kii soochi key madhyam seey kadam rakhane key liye suvidhaaen pradaan kartaa haye. c + + header cock _ 2 mein yeh karyakshamta pradaan kartaa haye.
cocksey _ 1 kii samagri kaa upayog aamtaur parr variadic karyon mein kiya jaataa haye, halanki unakaa upayog anya karyon mein kiya jaa sakata haye (udaaharan key liye, cocksey _ 4) jise variadic karyon dwara kahaa jaataa haye.
vividh prakaar key karyon kii ghoshana karna.
variadic function way function hain joe charr sankhya mein tark leey sakate hain aur antim parameter key sthaan parr ack deerghavritt key saath ghoshit kiye jaate hain. iss tarah key kaary kaa ack udaaharan haye cock _ 5. ack vishisht ghoshana haye
int check (int aeye, double bee,...);
variadic functions mein cumm seey cumm ack naamit parameter honah chaahiye, isaliye, udaaharan key liye,
galat (...);
see mein anumati naheen haye. (see + + aur है। mein, iss tarah kii ghoshana kii anumati haye.) see mein, ack alpaviram koo deerghavritt seey pahale honah chaahiye yadi ack naamit parameter nirdisht kiya gayaa haye; see + + mein, yeh vaikalpik haye.
vividh prakaar key karyon koo paribhaashit karna.
ack hii vaakya rachana kaa upayog ack paribhasha mein kiya jaataa haih
lamba funk (chaar, double, int,...);
lamba funk (chaar aeye, double bee, int see,...)
 / *... */
ack deerghavritt purani shally key kaary paribhashaon mein dikhaai naheen dey sakata haye.
tarkon taka pahunch.
anaam tarkon taka pahunchane key liye, kissy koo variadic function mein prakaar cock _ 6 key charr kii ghoshana karni chaahiye. macro cock _ 7 koo phir dou tarkon key saath kahaa jaataa haih pahala prakaar cock _ 6 kaa ghoshit charr haye, doosara kaary key antim naamit parameter kaa naam haye. है। mein doosara tark vaikalpik hoga aur iska mulyankan naheen kiya jaayega. isake baad, cock _ 9 macro key pratyek ahwan seey agala tark milata haye. cock _ 9 key liye pahala tark cock _ 6 haye aur doosara function koo paarit kiye gaye agale tark kaa prakaar haye. anta mein, function key lautane seey pahale cock _ 12 macro koo cock _ 6 parr coll kiya jaanaa chaahiye. (sabhi tarkon koo padhane kii aavashyakta naheen haye.)
c99 ack atirikt macro, cock _ 14 pradaan kartaa haye, joe ack cock _ 6 kii sthiti koo dohra sakata haye. macro ahwan cock _ 16 pratiyaan cock _ 17 koo cock _ 18 mein jodati hain.
function koo paarit anaam tarkon koo ginane yaa vargeekrit karane key liye koee paribhaashit vidhi naheen haye. kaary koo kissy tarah seey yeh jaanane yaa nirdhaarit karane kii aavashyakta hoti haye, jisake saadhan bhinn hotey hain. aam sammelanon mein shamil hainh
anya coll key liye anaam tarkon koo paarit karna.
kyonki anaam tark soochi kaa aakar aam taur parr agyaat haye (adhikansh sanklakon dwara niyojit colling sammelan praapt karane vaale kaary key ander cock _ 6 dwara ingit anaam tark block key aakar koo nirdhaarit karane kii anumati naheen dete hain), anaam tarkon koo aage badhaane kaa koee vishvasaniya, samanya tarika bhee naheen haye. yahaan taka kii jahaan tark soochi key aakar kaa nirdhaaran apratyaksh madhyamon seey sambhav haye (udaaharan key liye, cock _ 22 key praarup string koo pars karke), aantarik variadic coll mein tarkon kii gatishil roop seey nirdhaarit sankhya koo paarit karane kaa koee portable tarika naheen haye, kyonki aise coll mein paarit tarkon kii sankhya aur aakar koo aam taur parr sankalan samay parr jaanaa jaanaa chaahiye. kuchh hudd taka, iss pratibandh koo variadic karyon key bajaay variadic macro koo niyojit karke shithil kiya jaa sakata haye. isake alawa, adhikansh maanak pustakalaya prakriyaaen 23-purvanirdhaarit vaikalpik sanskaran pradaan karati hain joe anaam tark soochi (i.ee. ack praarambhik cock _ 6 charr) anaam tark soochi key bajaay. udaaharan key liye, vaastavik anaam tark soochi key bajaay ack cock _ 6 kii ummeed karane vaalaa cock _ 25 cock _ 22 kaa ack vaikalpik sanskaran haye. ack upayogkarta-paribhaashit variadic function isaliye cock _ 7 kaa upayog karke ack cock _ 6 charr koo aarambh curr sakata haye aur ise ack upayukt maanak pustakalaya function mein paarit curr sakata haye, prabhaav mein ise moolya dwara karane key bajaay sandarbh dwara anaam tark soochi koo paarit curr sakata haye. kyonki see mein moolya dwara anaam tark soochiyon koo paarit karane kaa koee vishvasaniya tarika naheen haye, isake bajaay cock _ 6 koo sweekaar karate hue samkaksh kaary pradaan kiye binaa variadic api kaary pradaan karna ack kharaab prograaming abhyaas maanaa jaataa haye.
prakaar suraksha.
kuchh see karyanvayan see extension pradaan karate hain joe sankalak koo praarup string aur sandinal key uchit upayog kii jaanch karane kii anumati dete hain. inn extensions koo chhodkar, sankalak aamtaur parr yeh jaanch naheen curr sakata haye kii kyaa anaam tark usa prakaar key hain jisaki function ummeed kartaa haye, yaa unhein aavashyak prakaar mein parivartit curr sakata haye. isaliye, iss sambandh mein shuddhata sunishchit karane key liye dhyaan rakhaa jaanaa chaahiye, kyonki yadi prakaar mell naheen khaate hain tou anirdhaarit vyavhaar parinam hotaa haye. udaaharan key liye, yadi apekshit prakaar cocu _ 31 haye, tou ack null pointer koo cocu _ 32 key roop mein paarit kiya jaanaa chaahiye. kewal cocu _ 33 likhane seey yaa tou cocu _ 34 yaa cocu _ 35 prakaar kaa tark hoga, jinamen seey koee bhee sahee naheen haye. ack anya vichaar anaam tarkon parr lagu default tark prachaar haye. ack cock 36 koo swachaalit roop seey ack cock 37 mein padonnat kiya jaayega. isi tarah, ack cock 34 kii tulanaa mein sankeern prakaar key tarkon koo cock 34 yaa cock 40 mein padonnat kiya jaayega. anaam tark praapt karane vaale kaary koo padonnat prakaar kii ummeed karni chaahiye.
jee. see. see. mein ack vistaar haye joe paarit tarkon kii jaanch kartaa haih
udaaharan key liye.
/* ack samay mein sabhi aarg koo taba taka print karein jaba taka kii ack nakaratmak tark naheen dikhaai detaa haye;
 sabhi aarg koo int prakaar kaa maanaa jaataa haye. */
shoonya mudran chihn (int (int
 va list appy;
 aaee;
 va _ start (ap, arg1); 
 (i = arg1; i> = 0; i = va _ arg (ap, int)) key liye
 printf ("% d", i);
 va _ anned (ap);
 putcher ('\n');
int maine (shoonya)
 printargs (5,2,14,84,97,15,-1,48,-1);
 printargs (84,51,-1,3);
 printargs (-1);
 printargs (1,-1);
 vaapas 0;
iss karyakram seey utpaadan hotaa haih
apane kaary key bheetar seey anya vaar aarg karyon koo coll karane key liye (jaise kii sprintuff) aapako kaary key vaar aarg sanskaran kaa upayog karane kii aavashyakta haye (iss udaaharan mein banaam printuff):
shoonya myprintf (const chaar * praarup,...)
 va _ soochi args;
 chaar buffer [bufiz];
 va _ start (args, praarup);
 banaam enprintf (buffer, buffer kaa aakar, praarup, aarg);
 va _ anned (args);
 flushfanistream (buffer);
varag.aich.
posics key puraane sanskaranon ney viraasat header koo paribhaashit kiya haye, joe see key mankikaran seey pahale kaa haye aur cocksey 1 key samaan karyakshamta pradaan kartaa haye. yeh header naa tou iso see kaa hissa haye aur naa hii posics kaa. ekal unix vinirdesh key dusare sanskaran mein paribhaashit file mein, kewal c89 cocu _ 1 kii sabhi kaaryakshamtaaen shamil hain, apvaadon key saath kih
interfaces bhee alag haye. udaaharan key liye, isake bajaay koee likh sakata haih
/* koee "shoonya" prakaar naheen haye; ack antarnihit antarvarti kaa upayog karein. */
printargs printargs, vaa _ alast)
 yahaan koee ardhaviram naheen! */
 va list appy;
 aaee;
 va _ start (ap);/* kewal va _ soochi dee gaee haye! */
 (i = arg1; i> = 0; i = va _ arg (ap, int)) key liye
 printf ("% d", i);
 va _ anned (ap);
 putcher ('\n');
 vaapsee;
aur ise usee tarah seey kahaa jaataa haye.
cock _ 41 koo karyanvayan key tareeke key kaaran purani shally key kaary paribhashaon kii aavashyakta hoti haye. isake vipareet, purani shally kii kaary paribhashaon koo coc _ 1 key saath jodana sambhav naheen haye.

