<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CEIHQnc6fSp7ImA9WhRaE0U.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642</id><updated>2012-02-16T00:55:33.915-08:00</updated><category term="Data Structure Problems" /><category term="Data Structure Programs" /><category term="c++ program" /><category term="Data Structure Concepts" /><category term="C Questions" /><category term="Algorithm Implementation" /><category term="C Examples" /><category term="C Puzzles" /><category term="C Simple Projects" /><category term="C Programs" /><category term="C Guide" /><title>Data Structures and C Programming</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://datastructuresprogramming.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>76</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/DataStructuresCProgramming" /><feedburner:info uri="datastructurescprogramming" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>DataStructuresCProgramming</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;DUEHSHwyfCp7ImA9WhZbEUo.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-549444171076399257</id><published>2011-06-15T15:38:00.000-07:00</published><updated>2011-06-15T15:40:39.294-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-15T15:40:39.294-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Data Structure Programs" /><category scheme="http://www.blogger.com/atom/ns#" term="C Simple Projects" /><category scheme="http://www.blogger.com/atom/ns#" term="Algorithm Implementation" /><title>C program for Evaluating a Postfix Expression</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/549444171076399257/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2011/06/c-program-for-evaluating-postfix.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/549444171076399257?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/549444171076399257?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/aLK9ash0Kio/c-program-for-evaluating-postfix.html" title="C program for Evaluating a Postfix Expression" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">The Algorithm for Evaluating a Postfix Expression  is given here

Program: 


&amp;lt;!--
pre { font-family: monospace; color: #000000; background-color: #ffffff; }
body { font-family: monospace; color: #000000; background-color: #ffffff; }
.Comment { color: #0000ff; }
.Special { color: #6a5acd; }
.Statement { color: #a52a2a; font-weight: bold; }
.Type { color: #2e8b57; font-weight: bold; }
.Constant { 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/04yQdIv1XhLRrhtmQ8Qs8tuGkqI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/04yQdIv1XhLRrhtmQ8Qs8tuGkqI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/04yQdIv1XhLRrhtmQ8Qs8tuGkqI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/04yQdIv1XhLRrhtmQ8Qs8tuGkqI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/aLK9ash0Kio" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2011/06/c-program-for-evaluating-postfix.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMCSH0-fip7ImA9WhZTE0k.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-1161337324837756716</id><published>2011-03-16T13:38:00.000-07:00</published><updated>2011-03-16T23:31:09.356-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-16T23:31:09.356-07:00</app:edited><title>C program for converting Infix expression to postfix expression</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/1161337324837756716/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2011/03/c-program-for-converting-infix.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/1161337324837756716?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/1161337324837756716?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/-NHDjXitnEs/c-program-for-converting-infix.html" title="C program for converting Infix expression to postfix expression" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><content type="html">The Algorithm for converting Infix expression to postfix expression is given here

Program:

#include&amp;lt;stdio.h&amp;gt;
#define SIZE 40
char stack[SIZE];
int top=-1;

void push(char data)
{
    if(top==SIZE-1)
    {
        printf("Stack is full\n");
        return;
    }
    else
    {
        top=top+1;
        stack[top]=data;
        printf("Pushed element is %c\n",data);
    }
}

char pop()
{
    
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xOeVILnYzOagFM4p9XmWK6IZ3mQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xOeVILnYzOagFM4p9XmWK6IZ3mQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xOeVILnYzOagFM4p9XmWK6IZ3mQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xOeVILnYzOagFM4p9XmWK6IZ3mQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/-NHDjXitnEs" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2011/03/c-program-for-converting-infix.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8FQHc9eip7ImA9Wx9VEEo.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-8084416922679087254</id><published>2011-01-26T12:46:00.000-08:00</published><updated>2011-01-26T12:46:51.962-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-26T12:46:51.962-08:00</app:edited><title>Daily 5 C programs-2</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/8084416922679087254/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2011/01/daily-5-c-programs-2.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/8084416922679087254?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/8084416922679087254?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/4Ywigq05dDI/daily-5-c-programs-2.html" title="Daily 5 C programs-2" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Write a program to print the number of characters entered?Count the Input characters
solution:#include&amp;lt;stdio.h&amp;gt;
int main()
{
    int x=0;
    while(getchar()!=EOF)
        ++x;
    printf("\nNumber of characters X=%d\n",x);
    return 0;
}Output:
hello world
Number of characters entered is X=11


Write a program to count the number of words entered
Solution:#include&amp;lt;stdio.h&amp;gt;
int main()
{
    int 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BinWHtdgu9F7GAL56P_ASCt_kPM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BinWHtdgu9F7GAL56P_ASCt_kPM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BinWHtdgu9F7GAL56P_ASCt_kPM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BinWHtdgu9F7GAL56P_ASCt_kPM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/4Ywigq05dDI" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2011/01/daily-5-c-programs-2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMGQ30yeip7ImA9Wx9WFUk.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-8921567001649176476</id><published>2011-01-19T12:11:00.000-08:00</published><updated>2011-01-20T09:10:22.392-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-20T09:10:22.392-08:00</app:edited><title>EOF[End Of File]</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/8921567001649176476/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2011/01/eofend-of-file.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/8921567001649176476?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/8921567001649176476?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/eGf50ttsoVE/eofend-of-file.html" title="EOF[End Of File]" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">End of file[EOF] is a condition in computer operating system where no more data can be read from a data source(file or stream).
EOF is actually a macro defined as an integer with a negative value(normally -1). 
 EOF is normally returned by functions that  perform read operations to denote either an error or end of input. It is important  to ensure you use an integer to store the return code from 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/CwARJpO0hUiQ_F9TqBFPvTtGL3Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CwARJpO0hUiQ_F9TqBFPvTtGL3Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/CwARJpO0hUiQ_F9TqBFPvTtGL3Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CwARJpO0hUiQ_F9TqBFPvTtGL3Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/eGf50ttsoVE" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2011/01/eofend-of-file.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU4HQ3w8fyp7ImA9Wx9WFUQ.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-7461307639118936361</id><published>2011-01-19T11:39:00.000-08:00</published><updated>2011-01-20T23:12:12.277-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-20T23:12:12.277-08:00</app:edited><title>Daily 5 C programs-1</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/7461307639118936361/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2011/01/daily-5-c-programs-1.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/7461307639118936361?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/7461307639118936361?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/kltwJ5i-YsU/daily-5-c-programs-1.html" title="Daily 5 C programs-1" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Write a program to print the value of EOF.?
Solution:/*************Program1***********/
#include&amp;lt;stdio.h&amp;gt;
int main()
{
    int ch=getchar();
    printf("%d",ch);
    return;
}
---------------------------------------
/*************Program2***********/
#include&amp;lt;stdio.h&amp;gt;
int main()
{
    printf("%d",EOF);
    return;
}
In Windows if you enter the keys Control + Z you get EOF, in Linux it is Control 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0Z2ckE3C_8CPR1cY0oXCLopBeBY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0Z2ckE3C_8CPR1cY0oXCLopBeBY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0Z2ckE3C_8CPR1cY0oXCLopBeBY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0Z2ckE3C_8CPR1cY0oXCLopBeBY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/kltwJ5i-YsU" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2011/01/daily-5-c-programs-1.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYESXc-fCp7ImA9Wx9WE0U.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-3292417971820651599</id><published>2011-01-18T12:36:00.000-08:00</published><updated>2011-01-18T12:38:28.954-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-18T12:38:28.954-08:00</app:edited><title>Some questions about Arrays with answers</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/3292417971820651599/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2011/01/silly-questions-about-arrays-with.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/3292417971820651599?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/3292417971820651599?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/VIar6g41I9E/silly-questions-about-arrays-with.html" title="Some questions about Arrays with answers" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">How will you define an array?
Storage class datatype  array_name[size of array]
Example:static int sum[8];
auto float fun[20]; (or) float fun[20];

Is it necessary to specify the storage class in array definition? what is the default storage class for arrays?
Answer:
Storage class is optional. If the array is defined with in a function or a block the default storage class is auto. If the array is
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/T6HAxc6yRj1fb8N3mM7L1uMJSU0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/T6HAxc6yRj1fb8N3mM7L1uMJSU0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/T6HAxc6yRj1fb8N3mM7L1uMJSU0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/T6HAxc6yRj1fb8N3mM7L1uMJSU0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/VIar6g41I9E" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2011/01/silly-questions-about-arrays-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUDQHw7cCp7ImA9Wx9RF0U.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-327246912301401609</id><published>2010-12-19T05:44:00.000-08:00</published><updated>2010-12-19T10:44:31.208-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-19T10:44:31.208-08:00</app:edited><title>Multifile Program in C</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/327246912301401609/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/12/multifile-program.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/327246912301401609?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/327246912301401609?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/_7igeESZ7sw/multifile-program.html" title="Multifile Program in C" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">1.What is a Multifile program?If a program contains many functions then it is difficult to read and maintain because when the number of functions increases the size of the program/file will also increase. To avoid this some functions can be written in separate file 
The individual files will be compiled separetely and then linked together to form one executable object program.
This will help to 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-09StDX4X3rvMnYo018qs0vWG6E/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-09StDX4X3rvMnYo018qs0vWG6E/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-09StDX4X3rvMnYo018qs0vWG6E/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-09StDX4X3rvMnYo018qs0vWG6E/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/_7igeESZ7sw" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/12/multifile-program.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUQBSX4zfCp7ImA9Wx9RF0g.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-2157139504263738329</id><published>2010-12-12T11:18:00.000-08:00</published><updated>2010-12-19T02:09:18.084-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-19T02:09:18.084-08:00</app:edited><title>Static Variables in C</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/2157139504263738329/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/12/static-variables-in-c.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2157139504263738329?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2157139504263738329?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/7G8os3q4qXY/static-variables-in-c.html" title="Static Variables in C" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Static variable use the keyword static.
In a single file program static variable is similar to auto variables.
Like auto variables, static variables are also local to the block in which they are declared.It cannot be accessed outside of their defining function.
The difference between auto and static variable is that static variables dont disappear when the function is no longer active. their 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gBUQinm8i8GFtRBLRH4JWoihi6o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gBUQinm8i8GFtRBLRH4JWoihi6o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gBUQinm8i8GFtRBLRH4JWoihi6o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gBUQinm8i8GFtRBLRH4JWoihi6o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/7G8os3q4qXY" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/12/static-variables-in-c.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUYCQX4_cCp7ImA9Wx9WE0U.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-3920329223255943766</id><published>2010-12-09T11:30:00.000-08:00</published><updated>2011-01-18T12:39:20.048-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-18T12:39:20.048-08:00</app:edited><title>Some Questions about Arrays</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/3920329223255943766/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/12/some-questions-about-arrays.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/3920329223255943766?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/3920329223255943766?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/leUdUFKhbxg/some-questions-about-arrays.html" title="Some Questions about Arrays" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">How will you define an array?
Is it necessary to specify the storage class in array definition? what is the default storage class for arrays?
If the array elements are not initialized then what is the default initial value?for example: int x[5]; what is the value of x[1]? 
Consider we have a 10 element array what happen if we try to access the 12th element?
Can I declare the array without 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xeutuSiUwRG64j0l038gF1FzdCw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xeutuSiUwRG64j0l038gF1FzdCw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xeutuSiUwRG64j0l038gF1FzdCw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xeutuSiUwRG64j0l038gF1FzdCw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/leUdUFKhbxg" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/12/some-questions-about-arrays.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQGQnk6cCp7ImA9Wx9SE08.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-2959531497865791841</id><published>2010-12-02T12:24:00.000-08:00</published><updated>2010-12-02T12:38:43.718-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-02T12:38:43.718-08:00</app:edited><title>Storage Classes in C(Extern)</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/2959531497865791841/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/12/storage-classes-in-cextern.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2959531497865791841?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2959531497865791841?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/F1NSyIy83hs/storage-classes-in-cextern.html" title="Storage Classes in C(Extern)" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">External Variables (or) Global Variables 
The scope of a external variables remains from the point of the definition through the remainder of the program.
 External variables are recognized globally, that can be accessed from any function 
Using external variables we can transfer information in to a function without using arguments.
The key word for external variable is extern.
 
External 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/N7FG6tECrQOW4MzgRxTm4v50EF8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N7FG6tECrQOW4MzgRxTm4v50EF8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/N7FG6tECrQOW4MzgRxTm4v50EF8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N7FG6tECrQOW4MzgRxTm4v50EF8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/F1NSyIy83hs" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/12/storage-classes-in-cextern.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UMQnoycSp7ImA9Wx9SEko.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-2616959504890754366</id><published>2010-11-21T09:07:00.000-08:00</published><updated>2010-12-01T22:28:03.499-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-01T22:28:03.499-08:00</app:edited><title>C programs</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/2616959504890754366/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/11/c-program-to-get-system-time.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2616959504890754366?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2616959504890754366?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/0jzXMEvl7Zc/c-program-to-get-system-time.html" title="C programs" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Write a c program to get the system time and date?
Solution:
#include&amp;lt;stdio.h&amp;gt;
#include&amp;lt;time.h&amp;gt;
int main()
{
    char *date;
    time_t timer;
    timer=time(NULL);
    date=asctime(localtime(&amp;amp;timer));
    printf("date:%s",date);
    return;
}
Output:
./a.out
date:Fri Nov 19 18:30:21 2010

Write a c program to reverse a line of text (or) reverse a string without using string fucnctions
#include&amp;lt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/E-Sd_9-HRmQPe30xvzdXWhzDYm8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/E-Sd_9-HRmQPe30xvzdXWhzDYm8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/E-Sd_9-HRmQPe30xvzdXWhzDYm8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/E-Sd_9-HRmQPe30xvzdXWhzDYm8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/0jzXMEvl7Zc" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/11/c-program-to-get-system-time.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcAR3Y5cSp7ImA9Wx9TEUw.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-4673179702289610678</id><published>2010-10-21T13:38:00.000-07:00</published><updated>2010-11-18T11:54:06.829-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-18T11:54:06.829-08:00</app:edited><title>Storage Classes in C</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/4673179702289610678/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/10/storage-classes-in-c.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/4673179702289610678?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/4673179702289610678?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/r4HYgo5RQqU/storage-classes-in-c.html" title="Storage Classes in C" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">What is a Local Variable?
 Local variable is  a variable which is recognized only with in a single function.
Normally local variables does not retain its value once control has been transferrd out of the function.
What is a global variable?
Global variaables can be recognized in two or more functions.
Global variables retain its value until the program terminated.


Storage Classes:
Storage class
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kGHcJs7rOFfic47B30misxK6uaY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kGHcJs7rOFfic47B30misxK6uaY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kGHcJs7rOFfic47B30misxK6uaY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kGHcJs7rOFfic47B30misxK6uaY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/r4HYgo5RQqU" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/10/storage-classes-in-c.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEUBSXYzeyp7ImA9Wx5VEEk.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-1511059583600475796</id><published>2010-09-21T13:15:00.000-07:00</published><updated>2010-10-02T10:57:38.883-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-02T10:57:38.883-07:00</app:edited><title>Questions on Data Input and Output</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/1511059583600475796/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/09/questions-on-data-input-and-output.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/1511059583600475796?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/1511059583600475796?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/4w9zKCjqRH8/questions-on-data-input-and-output.html" title="Questions on Data Input and Output" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">What are the commonly used input and output functions in c? How are they accessed?Solution 


* C has 6 popular data input and output library functions. They are getchar, putchar, printf, scanf, gets and puts.
* These functions handle data transfer between computer and the input/output device (keyboard,monitor)
* The functions getchar and putchar allow single characters to be transferred into and
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/N-RzEeudPDjFQqyAP3TPJtddW4g/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N-RzEeudPDjFQqyAP3TPJtddW4g/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/N-RzEeudPDjFQqyAP3TPJtddW4g/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/N-RzEeudPDjFQqyAP3TPJtddW4g/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/4w9zKCjqRH8" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/09/questions-on-data-input-and-output.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8ESHo5cSp7ImA9Wx5QGEQ.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-3970768386475616734</id><published>2010-09-07T14:08:00.000-07:00</published><updated>2010-09-07T14:10:09.429-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-07T14:10:09.429-07:00</app:edited><title>Data Input and Output-III</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/3970768386475616734/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/09/data-input-and-output-iii.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/3970768386475616734?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/3970768386475616734?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/6pdIPRlI600/data-input-and-output-iii.html" title="Data Input and Output-III" /><author><name>Sunitha</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Little More about printfFlags in printf function:We can place flags in the printf statement with in the control string which will affect the appearance of the output.The flag must be placed immediately after the percent sign(%).Two or flags can be combined for a single output. Table shows the commonly used flags FlagMeaning-Data item is left justified(ie)Blanks added after the data item+A sign(+(
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/i66o6sb8p8L_t7RATIybuchk4kc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/i66o6sb8p8L_t7RATIybuchk4kc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/i66o6sb8p8L_t7RATIybuchk4kc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/i66o6sb8p8L_t7RATIybuchk4kc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/6pdIPRlI600" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/09/data-input-and-output-iii.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4CRXsyeCp7ImA9Wx5QEkU.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-7400884457627430091</id><published>2010-08-31T14:08:00.000-07:00</published><updated>2010-08-31T14:09:24.590-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-31T14:09:24.590-07:00</app:edited><title>Data Input and Output-II</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/7400884457627430091/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/08/data-input-and-output-ii.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/7400884457627430091?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/7400884457627430091?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/na6AP1L2uqg/data-input-and-output-ii.html" title="Data Input and Output-II" /><author><name>Sunitha</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">4.Printf functionPrintf function prints data from the computers memory to the standard output device.Syntax:printf("%converion character",Argument list);Argument-&amp;gt;It can be constants,single variable, array names (or) complex expressions Example:#include&amp;lt;stdio.h&amp;gt;int main(){    int i=10,j=20;    char text[20];    printf("%d %d %s\n",i,j,text);    return 0;}printf allow us to include labels and 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vLytyARMG4kuM7lieEiCtBc89Zg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vLytyARMG4kuM7lieEiCtBc89Zg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vLytyARMG4kuM7lieEiCtBc89Zg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vLytyARMG4kuM7lieEiCtBc89Zg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/na6AP1L2uqg" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/08/data-input-and-output-ii.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAFQnk5fyp7ImA9Wx5SFkQ.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-841718944303051188</id><published>2010-08-13T03:18:00.000-07:00</published><updated>2010-08-13T03:18:33.727-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-13T03:18:33.727-07:00</app:edited><title>Data Input and Output-I</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/841718944303051188/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/08/data-input-and-output-i.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/841718944303051188?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/841718944303051188?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/S3ywn_yhWPE/data-input-and-output-i.html" title="Data Input and Output-I" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">C has 6 popular data input and output library functions. They are getchar, putchar, printf, scanf, gets and puts.
These functions handle data transfer between computer and the input/output device (keyboard,monitor)
 The functions getchar and putchar allow single characters to be transferred into and out of the computer.
The functions printf and scanf allow the transfer of single characters, 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fMEZoFfpov_ODCiVTRkEo_CmeYg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fMEZoFfpov_ODCiVTRkEo_CmeYg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fMEZoFfpov_ODCiVTRkEo_CmeYg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fMEZoFfpov_ODCiVTRkEo_CmeYg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/S3ywn_yhWPE" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/08/data-input-and-output-i.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YCSHo_fip7ImA9Wx5TFUQ.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-2240774947745286572</id><published>2010-07-31T10:57:00.000-07:00</published><updated>2010-07-31T10:59:29.446-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-31T10:59:29.446-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C Questions" /><title>Questions on Functions</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/2240774947745286572/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/07/questions-on-functions.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2240774947745286572?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2240774947745286572?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/QeA-PAPwYO4/questions-on-functions.html" title="Questions on Functions" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">Difference between pass by value and pass by reference? 
Can you write function similar to printf()?
How can called function determine number of arguments that have been passed to it?
What is the purpose of main() function? 
What are the advantages of functions?
Define function and built-in function?
Can the sizeof operator used to tell the size of an array passed to a function?
Is it possible to
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PxmcMtI9clOIX8Vc3E4OlHCJ9LY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PxmcMtI9clOIX8Vc3E4OlHCJ9LY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PxmcMtI9clOIX8Vc3E4OlHCJ9LY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PxmcMtI9clOIX8Vc3E4OlHCJ9LY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/QeA-PAPwYO4" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/07/questions-on-functions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUGQXYycSp7ImA9Wx5TFUw.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-743188275921556092</id><published>2010-07-30T10:58:00.000-07:00</published><updated>2010-07-30T11:07:00.899-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-30T11:07:00.899-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C Simple Projects" /><title>Airline Reservation System in C</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/743188275921556092/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/07/airline-reservation-system-in-c.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/743188275921556092?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/743188275921556092?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/K3Bbnw3H-co/airline-reservation-system-in-c.html" title="Airline Reservation System in C" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">
DescriptionDevelop a software using C for the case given below.


Write a program to assign  seats on each fligh of the airlines only place ( capacity : 20 seats ).  Your program should display the following menu alternatives.

Please  type 1 for business class
please type 2 for economy class

If  person types 1, the program should assign a seat in business class (  seat 1 to 5). if the person 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/liCrs9ovJoKt1lvEdLJ9uayhAQU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/liCrs9ovJoKt1lvEdLJ9uayhAQU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/liCrs9ovJoKt1lvEdLJ9uayhAQU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/liCrs9ovJoKt1lvEdLJ9uayhAQU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/K3Bbnw3H-co" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/07/airline-reservation-system-in-c.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8HQng4fCp7ImA9Wx5TFUw.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-2889666771145899180</id><published>2010-06-21T17:52:00.000-07:00</published><updated>2010-07-30T11:17:13.634-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-30T11:17:13.634-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C Guide" /><title>String</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/2889666771145899180/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/06/string.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2889666771145899180?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2889666771145899180?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/pTSI7HeKPPc/string.html" title="String" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">String:
 Strings are character array.
Character array are stored in contiguous memory location. 
String Constant:
A string constant is a one-Dimensional array of characters terminated by a null character('\0').
Each character in the array occupies one byte of memory and the last character is always '\0' 
Example:
    char str[]={'C','P','U','\0'};
The terminating null character('\0') is very 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hJefeC534THoR4gVAycAm--8kGo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hJefeC534THoR4gVAycAm--8kGo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hJefeC534THoR4gVAycAm--8kGo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hJefeC534THoR4gVAycAm--8kGo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/pTSI7HeKPPc" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/06/string.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8CSH88fSp7ImA9Wx5TFUw.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-2221122799772102753</id><published>2010-06-01T16:12:00.001-07:00</published><updated>2010-07-30T11:17:49.175-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-30T11:17:49.175-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C Questions" /><title>Interview Questions</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/2221122799772102753/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/06/interview-questions.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2221122799772102753?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2221122799772102753?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/axaPRrBRpww/interview-questions.html" title="Interview Questions" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">1.  Difference between arrays and pointers?
2. What is the purpose of realloc( )?
3. What is static memory allocation and dynamic memory allocation?
4. How are pointer variables initialized?
5. Are pointers integers?
6. What is a pointer variable?
7. What is a pointer value and address?
8. What is a method?
9. What are the advantages of the functions?
10. What is the purpose of main( ) function?

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yz6ZNz1_wP0y-JUwWAKAee0QhVg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yz6ZNz1_wP0y-JUwWAKAee0QhVg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yz6ZNz1_wP0y-JUwWAKAee0QhVg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yz6ZNz1_wP0y-JUwWAKAee0QhVg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/axaPRrBRpww" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/06/interview-questions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8HQng4fSp7ImA9Wx5TFUw.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-157594275115733529</id><published>2010-05-29T15:07:00.000-07:00</published><updated>2010-07-30T11:17:13.635-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-30T11:17:13.635-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C Guide" /><title>Pointers In C</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/157594275115733529/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/05/pointers-pointer-is-variable-contain.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/157594275115733529?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/157594275115733529?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/lYXBX_y4vX0/pointers-pointer-is-variable-contain.html" title="Pointers In C" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total><content type="html"> Pointers:
     Pointer is a variable contain the address of another variable. If a variable contains address of another  variable than it is said that first variable points to second. All operation  perform on pointers are done through two operators '*' and  '&amp;amp;'. '&amp;amp;' is a unary operator that returns a memory  address of a variable. '*' is complement of '&amp;amp;' and return value  stored at a memory 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WhraHmC_AVBacCE4mGiqXHL2NF0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WhraHmC_AVBacCE4mGiqXHL2NF0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WhraHmC_AVBacCE4mGiqXHL2NF0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WhraHmC_AVBacCE4mGiqXHL2NF0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/lYXBX_y4vX0" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/05/pointers-pointer-is-variable-contain.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8HQng4fSp7ImA9Wx5TFUw.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-2909805420112285584</id><published>2010-05-23T05:53:00.000-07:00</published><updated>2010-07-30T11:17:13.635-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-30T11:17:13.635-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C Guide" /><title>Assertion in C</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/2909805420112285584/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/05/assert-function.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2909805420112285584?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2909805420112285584?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/bkM9cCYe1Mg/assert-function.html" title="Assertion in C" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">An assertion is a 'conditional check' placed in a program to indicate that the developer thinks that the condtion has to be always true, at that place, for the program to work properly after that point. If the condition happens to be false, the program execution would be abruptly abhorted.

For example:

    assert (y!=0); /* The developer thinks that y shouldn't be equal to 0. If not, the code 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ERIskG-FRt0Wj5xz-lA0irQsxMU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ERIskG-FRt0Wj5xz-lA0irQsxMU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ERIskG-FRt0Wj5xz-lA0irQsxMU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ERIskG-FRt0Wj5xz-lA0irQsxMU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/bkM9cCYe1Mg" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/05/assert-function.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8CSH88fSp7ImA9Wx5TFUw.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-3177295399904267457</id><published>2010-05-20T13:14:00.000-07:00</published><updated>2010-07-30T11:17:49.175-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-30T11:17:49.175-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C Questions" /><title>Questions on Command Line Arguments</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/3177295399904267457/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/05/questions-on-command-line-arguments.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/3177295399904267457?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/3177295399904267457?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/8NEll-zPxWs/questions-on-command-line-arguments.html" title="Questions on Command Line Arguments" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">What is command line argument? 
Are variables argc and argv are local to main?
Does there exist any way to make the command line arguments available to other functions without passing them as arguments to function?
Is there any way to expand any wildcard characters present in the commandl ine arguments? If yes state that?
What is the maximum length of command line arguments including space 
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1e5rq-N3KJ9s0C9PZydjikJfXO4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1e5rq-N3KJ9s0C9PZydjikJfXO4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1e5rq-N3KJ9s0C9PZydjikJfXO4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1e5rq-N3KJ9s0C9PZydjikJfXO4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/8NEll-zPxWs" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/05/questions-on-command-line-arguments.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8HQng4fip7ImA9Wx5TFUw.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-2101911223238218339</id><published>2010-05-18T10:26:00.000-07:00</published><updated>2010-07-30T11:17:13.636-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-30T11:17:13.636-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C Guide" /><title>Command Line Arguments</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/2101911223238218339/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/05/command-line-arguments.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2101911223238218339?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/2101911223238218339?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/wMBhCbcgdmg/command-line-arguments.html" title="Command Line Arguments" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><content type="html">Getting the arguments from command prompt in c is known as command line arguments.
Command line is that it consists of a sequence of words,typically separated by whitespace.Main program can receive these words as an array of strings,one word per string.
main function will accept 2 parameters ,argv and argc
argc will be the count of the number of strings given on the command line.
argv will be the
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/0SPf2JbMxk1tOtTi1GXF2bm3yJU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0SPf2JbMxk1tOtTi1GXF2bm3yJU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/0SPf2JbMxk1tOtTi1GXF2bm3yJU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/0SPf2JbMxk1tOtTi1GXF2bm3yJU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/wMBhCbcgdmg" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/05/command-line-arguments.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8MQH4_fyp7ImA9Wx5TFUw.&quot;"><id>tag:blogger.com,1999:blog-3012383994992801642.post-439937902298296637</id><published>2010-05-17T09:32:00.000-07:00</published><updated>2010-07-30T11:18:01.047-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-07-30T11:18:01.047-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="C Programs" /><title>C Programs based on Command Line Arguments</title><link rel="replies" type="application/atom+xml" href="http://datastructuresprogramming.blogspot.com/feeds/439937902298296637/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://datastructuresprogramming.blogspot.com/2010/05/c-programs-based-on-command-line.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/439937902298296637?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3012383994992801642/posts/default/439937902298296637?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/DataStructuresCProgramming/~3/Zqbu7TFKAj0/c-programs-based-on-command-line.html" title="C Programs based on Command Line Arguments" /><author><name>Sunitha</name><uri>http://www.blogger.com/profile/03913750430133539687</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><content type="html">Write a program to do the following 
Read a text file provided at command prompt
Print each word in reverse order

For example if the file contains WELCOME TO C output should be C OT EMOCLEW

Write a program using command line arguments to search for a word in a file and replace it with the specified word.The usage of the program is shown below
C &amp;gt; change &amp;lt; oldword &amp;gt; &amp;lt; newword &amp;gt; &amp;lt; filename &amp;gt;

&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/URx6FvsxKn0wJdGCX5l7tfGS94A/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/URx6FvsxKn0wJdGCX5l7tfGS94A/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/URx6FvsxKn0wJdGCX5l7tfGS94A/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/URx6FvsxKn0wJdGCX5l7tfGS94A/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/DataStructuresCProgramming/~4/Zqbu7TFKAj0" height="1" width="1"/&gt;</content><feedburner:origLink>http://datastructuresprogramming.blogspot.com/2010/05/c-programs-based-on-command-line.html</feedburner:origLink></entry></feed>

