tag:blogger.com,1999:blog-7662544687317968079.post848275668711000088..comments2024-03-28T19:27:22.265-07:00Comments on Interview Questions: Write your own printf() function in C.Vijay Agrawalhttp://www.blogger.com/profile/16856170291286959451noreply@blogger.comBlogger110125tag:blogger.com,1999:blog-7662544687317968079.post-60849185141823589982022-07-31T12:53:02.464-07:002022-07-31T12:53:02.464-07:00replica bags by joy hermes fake x3o16x8d60 replica...replica bags by joy <a href="https://www.dolabuy.ru/hermes-c-157_281/" rel="nofollow"><strong>hermes fake</strong></a> x3o16x8d60 replica bags blog replica bags nancy <a href="https://www.dolabuy.ru/handbags-c-157/" rel="nofollow"><strong>click here for info</strong></a> m5t96z7u92 replica bags south africa replica prada nylon bags <a href="https://www.dolabuy.ru/gucci-c-157_168/" rel="nofollow"><strong>replica gucci bag</strong></a> d5k94b3h55 zeal replica bagssoughnhttps://www.blogger.com/profile/13656748904075418406noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-35350925511792157052021-02-03T09:32:58.817-08:002021-02-03T09:32:58.817-08:00It is really nice post; I like it very much.
best ...It is really nice post; I like it very much.<br /><a href="https://www.sleekboxes.com/shop/product/handover-boxes-66" rel="nofollow">best Custom Handover Boxes</a><br /><a href="https://www.sleekboxes.com/shop/product/lingerie-boxes-35" rel="nofollow">best Lingerie Boxes</a>Serina johsonhttps://www.blogger.com/profile/16459804040011863444noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-66199406998343998012021-02-03T09:32:25.198-08:002021-02-03T09:32:25.198-08:00Amazing product thanks for sharing with us It is v...Amazing product thanks for sharing with us It is very informative.<br /><a href="https://www.sleekboxes.com/shop/product/tie-boxes-55" rel="nofollow">Tie Boxes for sale</a><br /><a href="https://www.sleekboxes.com/shop/product/hair-extension-boxes-31" rel="nofollow">Hair Extension box manufacturers</a>Serina johsonhttps://www.blogger.com/profile/16459804040011863444noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-56445125344959744332020-11-27T14:29:27.588-08:002020-11-27T14:29:27.588-08:00It is a very informative post thanks for sharing t...It is a very informative post thanks for sharing the information.<br /><a href="https://www.packhit.com/custom-invitation-boxes/" rel="nofollow">Invitation Boxes printed wholesale all over the USA </a><br /><a href="https://www.packhit.com/custom-business-card-boxes/" rel="nofollow">Business Card Boxes packaging boxes suppliers </a>thomasjackhttps://www.blogger.com/profile/01657927696460949488noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-76623646874270808162020-11-27T14:28:24.513-08:002020-11-27T14:28:24.513-08:00Good blog thanks for sharing the information.
cus...Good blog thanks for sharing the information.<br /><a href="https://www.packhit.com/custom-popcorn-boxes/" rel="nofollow"> custom popcorn boxes companies </a><br /><a href="https://www.packhit.com/custom-coffee-boxes/" rel="nofollow">Coffee Boxes packaging wholesale </a>thomasjackhttps://www.blogger.com/profile/01657927696460949488noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-62994464666292084002020-03-30T01:58:52.081-07:002020-03-30T01:58:52.081-07:00christian louboutin outlet
nike air force
jordan s...<a href="http://www.louboutins.us.com" rel="nofollow"><strong>christian louboutin outlet</strong></a><br /><a href="http://www.nikeairforce1.us.com" rel="nofollow"><strong>nike air force</strong></a><br /><a href="http://www.jordan6.us.com" rel="nofollow"><strong>jordan shoes</strong></a><br /><a href="http://www.monclercoat.us.com" rel="nofollow"><strong>moncler coat</strong></a><br /><a href="http://www.goldengoosesneakersstore.com" rel="nofollow"><strong>golden goose sneakers</strong></a><br /><a href="http://www.nikebasketballshoes.us.com" rel="nofollow"><strong>nike basketball shoes</strong></a><br /><a href="http://www.adidasnmdr1.us.com" rel="nofollow"><strong>adidas nmd</strong></a><br /><a href="http://www.balenciaga-shoes.us" rel="nofollow"><strong>balenciaga</strong></a><br /><a href="http://www.jordan-retro.us.com" rel="nofollow"><strong>retro jordans</strong></a><br /><a href="http://www.supremesoutlet.us.com" rel="nofollow"><strong>supreme outlet</strong></a><br />yanmaneeehttps://www.blogger.com/profile/15229165146687805497noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-33362489567575634852019-10-15T15:29:15.949-07:002019-10-15T15:29:15.949-07:00sbobet88<a href="https://www.pasarantaruhansbobet.com/pasaran-taruhan-sbobet/" rel="nofollow">sbobet88</a>Laurens99https://www.blogger.com/profile/02867116381047873959noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-29052698952706514142019-10-13T17:43:22.441-07:002019-10-13T17:43:22.441-07:00idn poker<a href="http://www.daftar-idnpoker.tk/poker-online/" rel="nofollow">idn poker</a>Laurens99https://www.blogger.com/profile/02867116381047873959noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-29058449218179448442019-10-11T10:22:45.773-07:002019-10-11T10:22:45.773-07:00idn poker<a href="http://www.agenpokerplace88.org/idn-pokerplace88/" rel="nofollow">idn poker</a>Laurens99https://www.blogger.com/profile/02867116381047873959noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-92035340517483846772019-10-07T09:49:46.186-07:002019-10-07T09:49:46.186-07:00http://www.judi-ikan.com<a href="http://www.judi-ikan.com" rel="nofollow">http://www.judi-ikan.com</a>Laurens99https://www.blogger.com/profile/02867116381047873959noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-89759699828706111222019-10-06T11:11:58.530-07:002019-10-06T11:11:58.530-07:00Hi there. Very cool site!! Guy ..Wonderful .. I wi...Hi there. Very cool site!! Guy ..Wonderful .. I will bookmark your website and take the feeds additionally…I am glad to locate so much useful info right here in the article. Thanks for sharing…<br /><a href="http://www.daftarosg777.net" rel="nofollow">http://www.daftarosg777.net</a>Laurens99https://www.blogger.com/profile/02867116381047873959noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-83688456327166491132019-10-03T14:09:23.286-07:002019-10-03T14:09:23.286-07:00http://www.registrasiidnplay.com<a href="http://www.registrasiidnplay.com" rel="nofollow">http://www.registrasiidnplay.com</a>Laurens99https://www.blogger.com/profile/02867116381047873959noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-82455447769577032002019-10-02T15:39:24.885-07:002019-10-02T15:39:24.885-07:00Artikel yang sangat bagus dan bermanfaat. Jika ada...Artikel yang sangat bagus dan bermanfaat. Jika ada waktu mungkin anda bisa berkunjung ke halaman saya.<br /><a href="https://link-sbobet88.blogspot.com/" rel="nofollow">LINK SBOBET88</a>Laurens99https://www.blogger.com/profile/02867116381047873959noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-89433149863577089292019-09-02T06:28:18.651-07:002019-09-02T06:28:18.651-07:00adidas gazelle
nike cortez
supreme hoodie
vapormax...<a href="http://www.adidasgazelle.us.com" rel="nofollow"><strong>adidas gazelle</strong></a><br /><a href="http://www.nikecortez.us.com" rel="nofollow"><strong>nike cortez</strong></a><br /><a href="http://www.supremesclothing.com" rel="nofollow"><strong>supreme hoodie</strong></a><br /><a href="http://www.vapormax.org.uk" rel="nofollow"><strong>vapormax</strong></a><br /><a href="http://www.jordanssneakers.us.com" rel="nofollow"><strong>jordan sneakers</strong></a><br /><a href="http://www.jordan-retro.us.com" rel="nofollow"><strong>retro jordans</strong></a><br /><a href="http://www.kd12.org" rel="nofollow"><strong>kd 12</strong></a><br /><a href="http://www.shoesyeezy.us" rel="nofollow"><strong>yeezy shoes</strong></a><br /><a href="http://www.nikecortez.us.com" rel="nofollow"><strong>nike cortez men</strong></a><br /><a href="http://www.air-vapormax.com" rel="nofollow"><strong>vapormax</strong></a><br />yanmaneeehttps://www.blogger.com/profile/15229165146687805497noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-78522572003568724802018-09-18T03:01:17.623-07:002018-09-18T03:01:17.623-07:00Appreciate you sharing, great blog and I am glad t...Appreciate you sharing, great blog and I am glad that you shared this useful information with us.<br /><br /><br /><a href="http://www.abcmit.com/mobile-repairing-course-in-delhi/" rel="nofollow">Mobile Repairing Course in Delhi</a><br /><a href="http://www.mobilerepairingcourses.com/" rel="nofollow">Mobile Repairing Institute in Delhi</a>Gaganhttps://www.blogger.com/profile/06562468305561869267noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-6024814520891787702017-09-26T20:06:02.129-07:002017-09-26T20:06:02.129-07:00#include
#include
Voor main(){
Print("Hello c...#include<br />#include<br />Voor main(){<br />Print("Hello c language");<br /><br />Fetch();<br />}Anonymoushttps://www.blogger.com/profile/06554787074802560749noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-43544629362298136392015-08-12T00:19:09.694-07:002015-08-12T00:19:09.694-07:00Awesome, it was asked in my interview :-DAwesome, it was asked in my interview :-DBalo Babahttps://www.blogger.com/profile/13498699727434104345noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-73353897557090855212015-07-26T12:20:45.549-07:002015-07-26T12:20:45.549-07:00I wrote this program with little modification whic...I wrote this program with little modification which will take const char * as argument and return the no of bytes it will print which will match exact syntax of printf()<br />int myprintf(const char * frmt,...);<br /><br />#include <br />#include <br /><br />char *convert(unsigned int, int);<br /><br />main()<br />{<br /> int myprintf(const char *,...);<br /> char * convert(unsigned int, int);<br /> int i=65,returnvalue;<br /> char str[]="not printed with printf :D";<br /> returnvalue = myprintf("\nMessage = %s%d%x",str,i,i);<br /> myprintf("return=%d\n",returnvalue);<br />}<br /><br />int myprintf(const char * frmt,...)<br />{<br /> const char *p;<br /> int i;<br /> unsigned u;<br /> char *s;<br /> va_list argp;<br /> static count=0;<br /> va_start(argp, frmt);<br /> p=frmt;<br /> for(p=frmt; *p!='\0';p++)<br /> {<br /> if(*p!='%')<br /> {<br /> count ++;<br /> putchar(*p);<br /> continue;<br /><br /> }<br /> count++;<br /> p++;<br /> switch(*p)<br /> {<br /> case 'c' : i=va_arg(argp,int);putchar(i);break;<br /> case 'd' : i=va_arg(argp,int);<br /> if(i<0){<br /> i=-i;<br /> putchar('-');<br /> }<br /> puts(convert(i,10));<br /> break;<br /> case 'o': i=va_arg(argp,unsigned int); puts(convert(i,8));break;<br /> case 's': s=va_arg(argp,char *);<br /> count+=puts(s);<br /> break;<br /> case 'u': u=va_arg(argp, unsigned int); puts(convert(u,10));break;<br /> case 'x': u=va_arg(argp, unsigned int); puts(convert(u,16));break;<br /> case '%': putchar('%');break;<br /> }<br /> }<br /> va_end(argp);<br /> return count;<br />}<br />char *convert(unsigned int num, int base)<br />{<br /> static char buff[33];<br /> char *ptr;<br /> ptr=&buff[sizeof(buff)-1];<br /> *ptr='\0';<br /> do<br /> {<br /> *--ptr="0123456789abcdef"[num%base];<br /> num/=base;<br /> }while(num!=0);<br /> return(ptr);<br />}<br /><br />output:<br /><br />Message = not printed with printf :D<br />65<br />41<br />return=41Anonymoushttps://www.blogger.com/profile/11341844304003182936noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-44035067684362849292015-02-18T21:57:38.133-08:002015-02-18T21:57:38.133-08:00#include
#include
void Myprintf(char *,.....<br /><br />#include <br />#include <br /> <br />void Myprintf(char *,...); //Our printf function<br />char* convert(unsigned int, int); //Convert integer number into octal, hex, etc.<br /> <br /> <br />int main() <br />{ <br /> Myprintf(" WWW.FIRMCODES.COM \n %d", 9); <br /> <br /> return 0;<br />} <br /> <br /> <br />void Myprintf(char* format,...) <br />{ <br /> char *traverse; <br /> unsigned int i; <br /> char *s; <br /> <br /> //Module 1: Initializing Myprintf's arguments <br /> va_list arg; <br /> va_start(arg, format); <br /> <br /> for(traverse = format; *traverse != '\0'; traverse++) <br /> { <br /> while( *traverse != '%' ) <br /> { <br /> putchar(*traverse);<br /> traverse++; <br /> } <br /> <br /> traverse++; <br /> <br /> //Module 2: Fetching and executing arguments<br /> switch(*traverse) <br /> { <br /> case 'c' : i = va_arg(arg,int); //Fetch char argument<br /> putchar(i);<br /> break; <br /> <br /> case 'd' : i = va_arg(arg,int); //Fetch Decimal/Integer argument<br /> if(i<0) <br /> { <br /> i = -i;<br /> putchar('-'); <br /> } <br /> puts(convert(i,10));<br /> break; <br /> <br /> case 'o': i = va_arg(arg,unsigned int); //Fetch Octal representation<br /> puts(convert(i,8));<br /> break; <br /> <br /> case 's': s = va_arg(arg,char *); //Fetch string<br /> puts(s); <br /> break; <br /> <br /> case 'x': i = va_arg(arg,unsigned int); //Fetch Hexadecimal representation<br /> puts(convert(i,16));<br /> break; <br /> } <br /> } <br /> <br /> //Module 3: Closing argument list to necessary clean-up<br /> va_end(arg); <br />} <br /> <br />char *convert(unsigned int num, int base) <br />{ <br /> static char Representation[]= "0123456789ABCDEF";<br /> static char buffer[50]; <br /> char *ptr; <br /> <br /> ptr = &buffer[49]; <br /> *ptr = '\0'; <br /> <br /> do <br /> { <br /> *--ptr = Representation[num%base]; <br /> num /= base; <br /> }while(num != 0); <br /> <br /> return(ptr); <br />}<br /><br />i got it from http://www.firmcodes.com/write-printf-function-c/Anonymoushttps://www.blogger.com/profile/00149843037098669031noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-64522858440628299032015-02-18T21:57:24.395-08:002015-02-18T21:57:24.395-08:00#include
#include
void Myprintf(char *,.....<br /><br />#include <br />#include <br /> <br />void Myprintf(char *,...); //Our printf function<br />char* convert(unsigned int, int); //Convert integer number into octal, hex, etc.<br /> <br /> <br />int main() <br />{ <br /> Myprintf(" WWW.FIRMCODES.COM \n %d", 9); <br /> <br /> return 0;<br />} <br /> <br /> <br />void Myprintf(char* format,...) <br />{ <br /> char *traverse; <br /> unsigned int i; <br /> char *s; <br /> <br /> //Module 1: Initializing Myprintf's arguments <br /> va_list arg; <br /> va_start(arg, format); <br /> <br /> for(traverse = format; *traverse != '\0'; traverse++) <br /> { <br /> while( *traverse != '%' ) <br /> { <br /> putchar(*traverse);<br /> traverse++; <br /> } <br /> <br /> traverse++; <br /> <br /> //Module 2: Fetching and executing arguments<br /> switch(*traverse) <br /> { <br /> case 'c' : i = va_arg(arg,int); //Fetch char argument<br /> putchar(i);<br /> break; <br /> <br /> case 'd' : i = va_arg(arg,int); //Fetch Decimal/Integer argument<br /> if(i<0) <br /> { <br /> i = -i;<br /> putchar('-'); <br /> } <br /> puts(convert(i,10));<br /> break; <br /> <br /> case 'o': i = va_arg(arg,unsigned int); //Fetch Octal representation<br /> puts(convert(i,8));<br /> break; <br /> <br /> case 's': s = va_arg(arg,char *); //Fetch string<br /> puts(s); <br /> break; <br /> <br /> case 'x': i = va_arg(arg,unsigned int); //Fetch Hexadecimal representation<br /> puts(convert(i,16));<br /> break; <br /> } <br /> } <br /> <br /> //Module 3: Closing argument list to necessary clean-up<br /> va_end(arg); <br />} <br /> <br />char *convert(unsigned int num, int base) <br />{ <br /> static char Representation[]= "0123456789ABCDEF";<br /> static char buffer[50]; <br /> char *ptr; <br /> <br /> ptr = &buffer[49]; <br /> *ptr = '\0'; <br /> <br /> do <br /> { <br /> *--ptr = Representation[num%base]; <br /> num /= base; <br /> }while(num != 0); <br /> <br /> return(ptr); <br />}<br /><br />i got it from http://www.firmcodes.com/write-printf-function-c/Anonymoushttps://www.blogger.com/profile/00149843037098669031noreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-49945090183131623252013-06-18T07:34:45.458-07:002013-06-18T07:34:45.458-07:00Useful іnfoгmаtion. Fortunate mе I diѕсοvereԁ yοur...Useful іnfoгmаtion. Fortunate mе I diѕсοvereԁ yοur sіte unintеntionally, and I am <br />surprised ωhy this twist of fate didn't happened in advance! I bookmarked it.<br /><br />my web-site <a href="http://inspir8s.com/groups/oven-fans/" rel="nofollow">cheap halogen oven</a>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-63878096128364989472013-06-15T09:37:56.432-07:002013-06-15T09:37:56.432-07:00I am regulаr ѵіsіtor, hοω are you everybοdу?
Τhis ...I am regulаr ѵіsіtor, hοω are you everybοdу?<br />Τhis piecе οf ωriting <br />posted at this wеb site is actually nice.<br /><br />Μy website :: <a href="http://pop-u-lar.com/groups/know-the-best-leather-shoes-manufacturer-of-the-world/" rel="nofollow">silver heels</a>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-52750384847881564422013-06-15T06:46:57.529-07:002013-06-15T06:46:57.529-07:00Ι'm not sure why but this web site is loading ...Ι'm not sure why but this web site is loading incredibly slow for me. Is anyone else having this problem or is it a problem on my end? I'll check back later on <br />аnd ѕeе if the prοblеm still eхistѕ.<br /><br /><br />Look into mу web pаgе www.<br />idealworld.tv halоgеn ovеn (<a href="http://articleschase.com/Frigidaire-Double-Wall-Oven-Review.html" rel="nofollow"></a>)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-83865788500511336262013-06-05T04:20:41.035-07:002013-06-05T04:20:41.035-07:00I'm truly enjoying the design and layout of yo...I'm truly enjoying the design and layout of your site. It's <br />a very easy on the eyes which makes it much more pleasant for me to come here and visit more <br />often. Did you hire out a developer to create <br />your theme? Superb work!<br /><br />My site: <a href="http://www.dailystrength.org/people/3025162/journal/6474980" rel="nofollow">mobile home remodeling tips</a>Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-7662544687317968079.post-35300091300972040852013-05-23T18:12:15.074-07:002013-05-23T18:12:15.074-07:00We're a group of volunteers and starting a new...We're a group of volunteers and starting a new scheme in our community. Your web site offered us with valuable info to work on. You'vе donе <br />а formidable job and our ωhole communitу will be thankful <br />to you.<br /><br />Heгe іs my blog <a href="http://www.shamolsaya.com/index.php?do=/blog/20984/epilators-a-reliable-alternative-to-waxing/" rel="nofollow">buy an epilator</a>Anonymousnoreply@blogger.com