
{"id":2366,"date":"2010-08-07T23:57:45","date_gmt":"2010-08-07T18:27:45","guid":{"rendered":"http:\/\/www.jeffrin.in\/?p=2366"},"modified":"2010-08-07T23:57:45","modified_gmt":"2010-08-07T18:27:45","slug":"print-with-delay-0-6-with-option","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2010\/08\/07\/print-with-delay-0-6-with-option\/","title":{"rendered":"Print With Delay 0.6 ( with option)"},"content":{"rendered":"<p><a href=\"https:\/\/beautifulworknew.wordpress.com\/wp-content\/uploads\/2021\/03\/bdfff-printwithdelayoption111.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/beautifulworknew.wordpress.com\/wp-content\/uploads\/2021\/03\/bdfff-printwithdelayoption111.png?w=300\" alt=\"\" title=\"printwithdelayoption\" width=\"300\" height=\"225\" class=\"alignnone size-medium wp-image-2388\" \/><\/a><br \/>\n<code><br \/>\n\/* Jeffrin Jose  Licensed GPL v3 Copyright August 2010<br \/>\nGPL --&gt; http:\/\/www.gnu.org\/copyleft\/gpl.html *\/<\/p>\n<p>#include<br \/>\n#include<br \/>\n#include<br \/>\n#include<\/p>\n<p>int main(int argc,char *argv[])<br \/>\n{<br \/>\n        int count;<br \/>\n        int i=0,getptr;<br \/>\n        pid_t pid;<br \/>\n        size_t length;<br \/>\n        char array[20]=\"Happy Friendship Day\";<br \/>\n        \/* printf(\"n Happy Friendship Day n\"); *\/<br \/>\n        pid=fork();<br \/>\n        if (pid == 0)<br \/>\n        {<br \/>\n                setsid();<br \/>\n                setenv(\"PS1\",\"$\",1);<br \/>\n                \/* getptr=getenv(\"PS1\");<br \/>\n                printf(\"%s\",getptr); *\/<br \/>\n                printf(\"\\n\");<br \/>\n                for(i=0;i&lt;20;i++)<br \/>\n                {<br \/>\n                        printf(&quot;%c&quot;,array[i]);<br \/>\n                        \/* for(seconds=0;seconds&lt;100000000;seconds++);*\/<br \/>\n                        \/* system(&quot;sleep 1s&quot;);*\/<br \/>\n                        fflush(stdout);<br \/>\n                        usleep(100000);<br \/>\n                }<br \/>\n                printf(&quot; &quot;);<\/p>\n<p>                for(count=1;count &lt;argc;count++)<\/p>\n<p>                {<\/p>\n<p>                        printf(&quot;%s&quot;,argv[count]);<br \/>\n                        fflush(stdout);<br \/>\n                        usleep(100000);<br \/>\n                }<br \/>\n                printf(&quot;\\n&quot;);<br \/>\n                length=strlen(argv[1]);<br \/>\n                length= 21 + length;<br \/>\n                \/* printf(&quot;%d&quot;,length);*\/<br \/>\n                for(i=0;i&lt;length;i++)<br \/>\n  {<br \/>\n                        printf(&quot;%c&quot;,&#039;-&#039;);<br \/>\n                        \/* for(seconds=0;seconds&lt;100000000;seconds++);*\/<br \/>\n                        \/* system(&quot;sleep 1s&quot;);*\/<br \/>\n                        fflush(stdout);<br \/>\n                        usleep(100000);<br \/>\n                }<br \/>\n                printf(&quot;\\n&quot;);<br \/>\n        }<br \/>\n        \/* printf(&quot;%d&quot;,pid); *\/<br \/>\n        return 0;<br \/>\n}<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/* Jeffrin Jose Licensed GPL v3 Copyright August 2010 GPL &#8211;&gt; http:\/\/www.gnu.org\/copyleft\/gpl.html *\/ #include #include #include #include int main(int argc,char *argv[]) { int count; int i=0,getptr; pid_t pid; size_t length; char array[20]=&#8221;Happy Friendship Day&#8221;; \/* printf(&#8220;n Happy Friendship Day n&#8221;); *\/ pid=fork(); if (pid == 0) { setsid(); setenv(&#8220;PS1&#8243;,&#8221;$&#8221;,1); \/* getptr=getenv(&#8220;PS1&#8221;); printf(&#8220;%s&#8221;,getptr); *\/ printf(&#8220;\\n&#8221;); for(i=0;i&lt;20;i++) &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2010\/08\/07\/print-with-delay-0-6-with-option\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Print With Delay 0.6 ( with option)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[530,836,1035,1143,1214],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/2366"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=2366"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/2366\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=2366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=2366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=2366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}