<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7022819833043768245</id><updated>2011-04-21T19:27:20.826-07:00</updated><title type='text'>C WORLD</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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>73</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-6313038625006408237</id><published>2008-05-10T00:59:00.000-07:00</published><updated>2008-05-10T01:00:38.187-07:00</updated><title type='text'></title><content type='html'>&lt;a href="http://technorati.com/claim/m898wk8d59" rel="me"&gt;Technorati Profile&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-6313038625006408237?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/6313038625006408237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=6313038625006408237' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6313038625006408237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6313038625006408237'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/05/technorati-profile.html' title=''/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-8262067891113939695</id><published>2008-03-23T07:09:00.000-07:00</published><updated>2008-03-23T07:11:24.742-07:00</updated><title type='text'>filesystem in linux-text file</title><content type='html'>#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;fcntl.h&gt;&lt;br /&gt;#include&lt;string.h&gt;&lt;br /&gt;/**************MACROS*******************************/&lt;br /&gt;#define SUCCESS            0&lt;br /&gt;#define INVALID_CMD_ERR    1&lt;br /&gt;#define DATA_BASE_FULL_ERR 2&lt;br /&gt;#define ID_NOT_FOUND_ERR   3&lt;br /&gt;#define FAIL               4&lt;br /&gt;#define REC_SIZE       10&lt;br /&gt;&lt;br /&gt;/************Structure Type definitions***************/&lt;br /&gt;&lt;br /&gt;typedef struct&lt;br /&gt;{&lt;br /&gt;  int   stId;&lt;br /&gt;  char  name[20];&lt;br /&gt;  int   class;&lt;br /&gt;}student_t;&lt;br /&gt;&lt;br /&gt;typedef struct&lt;br /&gt;{&lt;br /&gt;  char cmdstr[32];&lt;br /&gt;  int  (*cmdfp)();&lt;br /&gt;}cmd_t;&lt;br /&gt;&lt;br /&gt;/*************Function Prototypes**********************/&lt;br /&gt;int display_help();&lt;br /&gt;int display_record();&lt;br /&gt;int add_record();&lt;br /&gt;int del_record();&lt;br /&gt;int mod_record();&lt;br /&gt;int exit_cmd();&lt;br /&gt;void line_to_record(char *lbuf, student_t *ptr);&lt;br /&gt;void strip_newline(char *name);&lt;br /&gt;/*************Global data definitions******************/&lt;br /&gt;FILE  *fp;&lt;br /&gt;cmd_t cmds[] =&lt;br /&gt;{&lt;br /&gt;   {"add",add_record},&lt;br /&gt;   {"disp",display_record},&lt;br /&gt;  // {"del",del_record},&lt;br /&gt; //  {"mod",mod_record},&lt;br /&gt;   {"help",display_help},&lt;br /&gt;   {"exit",exit_cmd}&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;int no_of_cmds = sizeof(cmds)/sizeof(cmd_t);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;  char cmd[100];&lt;br /&gt;  int i;&lt;br /&gt;  int stat;&lt;br /&gt;&lt;br /&gt;  printf("the size cmd_t %d size cmds %d",sizeof(cmd_t),sizeof(cmds));&lt;br /&gt;  printf("no of cmds %d",no_of_cmds);&lt;br /&gt;  &lt;br /&gt;  printf("\n student record program\n");&lt;br /&gt;  fp = fopen("st.txt","r+");&lt;br /&gt;  if(!fp)&lt;br /&gt;  {&lt;br /&gt;    fp = fopen("st.txt","w+");&lt;br /&gt;    if(!fp)&lt;br /&gt;    {&lt;br /&gt;      printf("error in creating st.txt\n");&lt;br /&gt;      exit(1);&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  display_help();&lt;br /&gt;  while(1)&lt;br /&gt;  {&lt;br /&gt;    printf("enter cmd&gt;");&lt;br /&gt;    scanf("%s",cmd);&lt;br /&gt;    stat = INVALID_CMD_ERR;&lt;br /&gt;    for(i=0; i&lt; no_of_cmds; i++)&lt;br /&gt;    {&lt;br /&gt;       if(strcmp(cmds[i].cmdstr,cmd) == 0)&lt;br /&gt;       {&lt;br /&gt;          stat = (*cmds[i].cmdfp)();&lt;br /&gt;          break;&lt;br /&gt;       }&lt;br /&gt;    }&lt;br /&gt;    if(stat == INVALID_CMD_ERR)&lt;br /&gt;        printf("Invalid command \n enter help to display valid commands\n");&lt;br /&gt;    else if(stat != SUCCESS)&lt;br /&gt;        printf("command failed with error %d",stat);&lt;br /&gt;    else&lt;br /&gt;        printf("command sucess and \n");&lt;br /&gt;  }&lt;br /&gt;    return SUCCESS;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int display_help()&lt;br /&gt;{&lt;br /&gt;   printf("disp : Display all the records\n");&lt;br /&gt;   printf("add  : Add a new record\n");&lt;br /&gt;   printf("del  : Deletes a given record\n");&lt;br /&gt;   printf("mod  : Modifies a given record\n");&lt;br /&gt;   printf("help : Display these help strings\n");&lt;br /&gt;   printf("exit : Exits the program\n");&lt;br /&gt;   &lt;br /&gt;  return SUCCESS;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int display_record()&lt;br /&gt;{&lt;br /&gt;  int length;&lt;br /&gt;  student_t st_rec;&lt;br /&gt;  char  lbuf[100];&lt;br /&gt;&lt;br /&gt;  rewind(fp);&lt;br /&gt;  length = fread(lbuf,1,REC_SIZE,fp);&lt;br /&gt;  if(length != REC_SIZE)&lt;br /&gt;  {&lt;br /&gt;     printf("no record found to printf\n");&lt;br /&gt;     return FAIL;&lt;br /&gt;  }&lt;br /&gt;  while(length == REC_SIZE)&lt;br /&gt;  {&lt;br /&gt;  &lt;br /&gt;    line_to_record(lbuf,&amp;st_rec);&lt;br /&gt;    if(st_rec.stId != -1)&lt;br /&gt;    {&lt;br /&gt;      printf("%d\t%s\t%d\n",st_rec.stId,st_rec.name,st_rec.class);&lt;br /&gt;    }&lt;br /&gt;    length = fread(lbuf,1,REC_SIZE,fp);&lt;br /&gt;  }&lt;br /&gt;  return SUCCESS;&lt;br /&gt;  &lt;br /&gt;}&lt;br /&gt;int add_record()&lt;br /&gt;{&lt;br /&gt;  int length;&lt;br /&gt;  student_t st_rec,temp;&lt;br /&gt;  char  lbuf[100];&lt;br /&gt;&lt;br /&gt;  printf("enter id\n"); &lt;br /&gt;  scanf("%d",&amp;st_rec.stId);&lt;br /&gt;  &lt;br /&gt;  printf("enter name \n");&lt;br /&gt;  __fpurge(stdin);&lt;br /&gt;  fgets(st_rec.name,40,stdin);&lt;br /&gt;  strip_newline(st_rec.name);&lt;br /&gt;  &lt;br /&gt;  printf("enter the class\n");&lt;br /&gt;  scanf("%d",&amp;st_rec.class);&lt;br /&gt;&lt;br /&gt;  rewind(fp);&lt;br /&gt;  while(1)&lt;br /&gt;  {&lt;br /&gt;    length = fread(lbuf,1,REC_SIZE,fp);&lt;br /&gt;    if(length != REC_SIZE)&lt;br /&gt;       break;&lt;br /&gt;    line_to_record(lbuf,&amp;temp);&lt;br /&gt;    if(temp.stId == -1)&lt;br /&gt;    {&lt;br /&gt;      fseek(fp,REC_SIZE* -1,SEEK_CUR);&lt;br /&gt;      fprintf(fp,"%4d,%30s,%4d\n",st_rec.stId,st_rec.name,st_rec.class);&lt;br /&gt;      return SUCCESS;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  fprintf(fp,"%4d,%30s,%4d\n",st_rec.stId,st_rec.name,st_rec.class);&lt;br /&gt;  return SUCCESS;&lt;br /&gt;  &lt;br /&gt;}&lt;br /&gt;//int del_record();&lt;br /&gt;//int mod_record();&lt;br /&gt;&lt;br /&gt;int exit_cmd()&lt;br /&gt;{&lt;br /&gt;  fclose(fp);&lt;br /&gt;  exit(0);&lt;br /&gt;}&lt;br /&gt;void line_to_record(char *lbuf, student_t *ptr)&lt;br /&gt;{&lt;br /&gt;  char *str;&lt;br /&gt;&lt;br /&gt;  str = strtok(lbuf,",\n");&lt;br /&gt;  sscanf(str,"%d",&amp;ptr-&gt;stId);&lt;br /&gt;  str = strtok(0,",\n");&lt;br /&gt;  strcpy(ptr-&gt;name,str);&lt;br /&gt;  str = strtok(0,",\n");&lt;br /&gt;  sscanf(str,"%d",&amp;ptr-&gt;class);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void strip_newline(char *name)&lt;br /&gt;{&lt;br /&gt;   int len;&lt;br /&gt;   len = strlen(name);&lt;br /&gt;   if(name[len-1] == '\n')&lt;br /&gt;      name[len-1] = 0;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-8262067891113939695?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/8262067891113939695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=8262067891113939695' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/8262067891113939695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/8262067891113939695'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/03/filesystem-in-linux-text-file.html' title='filesystem in linux-text file'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-8836938092357160930</id><published>2008-03-23T07:06:00.000-07:00</published><updated>2008-03-23T07:09:13.178-07:00</updated><title type='text'>File systems in linux-binary file</title><content type='html'>#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;sys/stat.h&gt;&lt;br /&gt;#include&lt;sys/types.h&gt;&lt;br /&gt;#include&lt;fcntl.h&gt;&lt;br /&gt;&lt;br /&gt;#define SUCCESS       0&lt;br /&gt;#define DATA_FULL     1&lt;br /&gt;#define ID_NOT_FOUND  2&lt;br /&gt;#define EMPTY_RECORD  3&lt;br /&gt;#define  MAX_RECORD   100&lt;br /&gt;typedef struct&lt;br /&gt;{&lt;br /&gt;  int stid;&lt;br /&gt;  char name[20];&lt;br /&gt;  int class;&lt;br /&gt;}student_t;&lt;br /&gt;&lt;br /&gt;#define  RECORD_SIZE  sizeof(student_t)&lt;br /&gt;&lt;br /&gt;//int fd;&lt;br /&gt;&lt;br /&gt;void display_help(void);&lt;br /&gt;int file_open(void);&lt;br /&gt;int display_record(int );&lt;br /&gt;int add_record(int ,student_t *);&lt;br /&gt;int delete_record(int ,int );&lt;br /&gt;int search_record(int ,int );&lt;br /&gt;int modify_record(int ,student_t *);&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;  int option,status,fd,id;&lt;br /&gt;  student_t st,*pst;&lt;br /&gt;  pst = &amp;st;&lt;br /&gt;  while(1)&lt;br /&gt;  {&lt;br /&gt;    display_help();&lt;br /&gt;    printf("select the option\n");&lt;br /&gt;    scanf("%d",&amp;option);&lt;br /&gt;&lt;br /&gt;    switch(option)&lt;br /&gt;    {&lt;br /&gt;      case 1:&lt;br /&gt;         printf("enter the student record\n");&lt;br /&gt;         printf("enter the student id\n");&lt;br /&gt;         scanf("%d",&amp;pst-&gt;stid);&lt;br /&gt;         printf("enter the student name\n");&lt;br /&gt;         scanf("%s",pst-&gt;name);&lt;br /&gt;         printf("enter the student class\n");&lt;br /&gt;         scanf("%d",&amp;pst-&gt;class);&lt;br /&gt;         fd = file_open();&lt;br /&gt;         status = add_record(fd,pst);&lt;br /&gt;         if(status == SUCCESS)&lt;br /&gt;  printf("adding into  record is success \n");&lt;br /&gt;         else&lt;br /&gt;  printf("adding into record is fail \n");&lt;br /&gt;         break;&lt;br /&gt;      case 2:&lt;br /&gt;         fd = file_open();&lt;br /&gt;         status = display_record(fd);&lt;br /&gt;         if(status == SUCCESS)&lt;br /&gt;  printf("display record is success \n");&lt;br /&gt;         else if(status = EMPTY_RECORD)&lt;br /&gt;  printf("no record to display \n");&lt;br /&gt;         break;&lt;br /&gt;      case 3:&lt;br /&gt;  &lt;br /&gt;         printf("enter the student record for modification \n");&lt;br /&gt;         printf("enter the student id\n");&lt;br /&gt;         scanf("%d",&amp;pst-&gt;stid);&lt;br /&gt;         printf("enter the modify student name\n");&lt;br /&gt;         scanf("%s",pst-&gt;name);&lt;br /&gt;         printf("enter the modify student class\n");&lt;br /&gt;         scanf("%d",&amp;pst-&gt;class);&lt;br /&gt;         status = modify_record(fd,pst);&lt;br /&gt;         if(status == SUCCESS)&lt;br /&gt;  printf("modify record is success \n");&lt;br /&gt;         else&lt;br /&gt;  printf("modify record is fail \n");&lt;br /&gt;         break;&lt;br /&gt;      case 4:&lt;br /&gt;         fd = file_open();&lt;br /&gt;         printf("enter the student id\n");&lt;br /&gt;         scanf("%d",&amp;id);&lt;br /&gt;         status =delete_record(fd,id);&lt;br /&gt;         if(status == SUCCESS)&lt;br /&gt;  printf("delete record is success \n");&lt;br /&gt;         else&lt;br /&gt;  printf("delete record is fail \n");&lt;br /&gt;         break;&lt;br /&gt;/*      case 5:&lt;br /&gt;         status = search_record(fd,stId);&lt;br /&gt;         if(status == SUCCESS)&lt;br /&gt;  printf("search record is success \n");&lt;br /&gt;         else&lt;br /&gt;  printf("search record is fail \n");&lt;br /&gt;         break;*/&lt;br /&gt;      case 6:&lt;br /&gt;         exit(0);&lt;br /&gt;      default:&lt;br /&gt;         printf("enter the worng option\n");&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int file_open(void)&lt;br /&gt;{&lt;br /&gt;  int fd;&lt;br /&gt;  fd = open("ravi.rec",O_RDWR);&lt;br /&gt;  if(fd &lt; 0)&lt;br /&gt;  {&lt;br /&gt;    printf("creating file ....\n");&lt;br /&gt;    fd = open("ravi.rec",O_RDWR|O_CREAT,0600);&lt;br /&gt;    if(fd &lt; 0)&lt;br /&gt;    {&lt;br /&gt;      printf("error in file creating\n");&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  return fd;&lt;br /&gt;}&lt;br /&gt;void display_help(void)&lt;br /&gt;{&lt;br /&gt;  printf("1 add record\t 2 display record\t3 modify record\n4 delete record\t 5 search record\t 6 exit\n");&lt;br /&gt;}&lt;br /&gt;int display_record(int fd)&lt;br /&gt;{&lt;br /&gt;   int length;&lt;br /&gt;   student_t rec;&lt;br /&gt;   lseek(fd,0,SEEK_SET);&lt;br /&gt;   length = read(fd,&amp;rec,RECORD_SIZE);&lt;br /&gt;   if(length != RECORD_SIZE)&lt;br /&gt;   {&lt;br /&gt;     printf("no records to print\n");&lt;br /&gt;     close(fd);&lt;br /&gt;     return(EMPTY_RECORD);&lt;br /&gt;   }&lt;br /&gt;   printf("ID        NAME       CLASS\n");&lt;br /&gt;   printf("---------------------------\n");&lt;br /&gt;   while(length == RECORD_SIZE)&lt;br /&gt;   {&lt;br /&gt;     if(rec.stid != -1)&lt;br /&gt;       printf("%d\t %s\t %d\n",rec.stid,rec.name,rec.class);&lt;br /&gt;     length = read(fd,&amp;rec,RECORD_SIZE);&lt;br /&gt;   }&lt;br /&gt;   close(fd);&lt;br /&gt;   return(SUCCESS);&lt;br /&gt;}&lt;br /&gt;   &lt;br /&gt;int add_record(int fd,student_t *new)&lt;br /&gt;{&lt;br /&gt;   int length;&lt;br /&gt;   student_t rec,temp_rec;&lt;br /&gt;   lseek(fd,0,SEEK_SET);&lt;br /&gt;   while(1)&lt;br /&gt;   {&lt;br /&gt;     length = read(fd,&amp;temp_rec,RECORD_SIZE);&lt;br /&gt;     if(length != RECORD_SIZE)&lt;br /&gt;       break;&lt;br /&gt;     printf("if record is empty\n");&lt;br /&gt;     if(temp_rec.stid == -1)&lt;br /&gt;     {&lt;br /&gt;        lseek(fd,RECORD_SIZE * -1,SEEK_CUR);&lt;br /&gt;        write(fd,new,RECORD_SIZE);&lt;br /&gt;        close(fd);&lt;br /&gt;        return SUCCESS;&lt;br /&gt;     }&lt;br /&gt;   }&lt;br /&gt;   write(fd,new,RECORD_SIZE);&lt;br /&gt;   close(fd);&lt;br /&gt;   return SUCCESS;&lt;br /&gt;   &lt;br /&gt;}&lt;br /&gt;int delete_record(int fd ,int id )&lt;br /&gt;{&lt;br /&gt;  int length;&lt;br /&gt;  student_t temp_rec;&lt;br /&gt;   lseek(fd,0,SEEK_SET);&lt;br /&gt;   while(1)&lt;br /&gt;   {&lt;br /&gt;     length = read(fd,&amp;temp_rec,RECORD_SIZE);&lt;br /&gt;     if(length != RECORD_SIZE)&lt;br /&gt;       break;&lt;br /&gt;     printf("if record is empty\n");&lt;br /&gt;     if(temp_rec.stid == id)&lt;br /&gt;     {&lt;br /&gt;        lseek(fd,RECORD_SIZE * -1,SEEK_CUR);&lt;br /&gt;        temp_rec.stid = -1;&lt;br /&gt;        write(fd,&amp;temp_rec,RECORD_SIZE);&lt;br /&gt;        close(fd);&lt;br /&gt;        return SUCCESS;&lt;br /&gt;     }&lt;br /&gt;   }&lt;br /&gt;   &lt;br /&gt;  close(fd);&lt;br /&gt;  return ID_NOT_FOUND; &lt;br /&gt;  &lt;br /&gt;}&lt;br /&gt;//int search_record(int ,int );&lt;br /&gt;int modify_record(int fd,student_t *modify)&lt;br /&gt;{&lt;br /&gt;  &lt;br /&gt;  int length;&lt;br /&gt;  student_t temp_rec;&lt;br /&gt;   lseek(fd,0,SEEK_SET);&lt;br /&gt;   while(1)&lt;br /&gt;   {&lt;br /&gt;     length = read(fd,&amp;temp_rec,RECORD_SIZE);&lt;br /&gt;     if(length != RECORD_SIZE)&lt;br /&gt;       break;&lt;br /&gt;     if(temp_rec.stid == modify-&gt;stid)&lt;br /&gt;     {&lt;br /&gt;        printf("modifing record\n");&lt;br /&gt;        lseek(fd,RECORD_SIZE * -1,SEEK_CUR);&lt;br /&gt;        write(fd,modify,RECORD_SIZE);&lt;br /&gt;        close(fd);&lt;br /&gt;        return SUCCESS;&lt;br /&gt;     }&lt;br /&gt;   }&lt;br /&gt;   return FAIL;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-8836938092357160930?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/8836938092357160930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=8836938092357160930' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/8836938092357160930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/8836938092357160930'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/03/file-systems-in-linux-binary-file.html' title='File systems in linux-binary file'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-3259186814307416924</id><published>2008-01-25T16:48:00.000-08:00</published><updated>2008-01-25T16:49:35.430-08:00</updated><title type='text'>find armstrong numbr</title><content type='html'>/* pgr t o find armstrong numbr&lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 28/08/07&lt;br /&gt;*/&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;math.h&gt;&lt;br /&gt; main()&lt;br /&gt; {&lt;br /&gt;  int x,value,z,y=0;&lt;br /&gt;  scanf("%d",&amp;value);&lt;br /&gt;  z=value;&lt;br /&gt;  while(z!=0)&lt;br /&gt;  {&lt;br /&gt;&lt;br /&gt;    x=z%10;&lt;br /&gt;    y=(x*x*x)+y;&lt;br /&gt;    z=z/10;&lt;br /&gt;  }&lt;br /&gt;  if(y==value)&lt;br /&gt;  printf("given no is amstrong number");&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-3259186814307416924?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/3259186814307416924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=3259186814307416924' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3259186814307416924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3259186814307416924'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/find-armstrong-numbr.html' title='find armstrong numbr'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-2371308896973214226</id><published>2008-01-25T16:47:00.000-08:00</published><updated>2008-01-25T16:48:31.215-08:00</updated><title type='text'>linked lists in data structures</title><content type='html'>/*pgr to use to linked lists in data structures&lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 22/07/08 */&lt;br /&gt; &lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; typedef struct linkedlist&lt;br /&gt; {&lt;br /&gt;   int rollno;&lt;br /&gt;   char name[20];&lt;br /&gt;   int marks;&lt;br /&gt;   char remarks[20];&lt;br /&gt;   struct linkedlist *next;&lt;br /&gt;  }stu_t;&lt;br /&gt;  stu_t *insert(stu_t *);&lt;br /&gt;  void *display(stu_t *); &lt;br /&gt;  main()&lt;br /&gt;  {&lt;br /&gt;  int option,status;&lt;br /&gt;  stu_t *head;&lt;br /&gt;  head=(stu_t *)malloc(sizeof(stu_t));&lt;br /&gt;&lt;br /&gt; while(1) &lt;br /&gt; {&lt;br /&gt;  puts("enter the option  1: insert 2:delete 3:update 4:sort 5:display 6:search 7:exit");  &lt;br /&gt;  scanf("%d",&amp;option);&lt;br /&gt;  switch(option)&lt;br /&gt;  {&lt;br /&gt;   case 1:&lt;br /&gt;          head=insert(head);&lt;br /&gt;          /* if(status==0)&lt;br /&gt;             printf("operation is success");&lt;br /&gt;           else&lt;br /&gt;             printf("operation is denied");*/&lt;br /&gt;          break;&lt;br /&gt;                 &lt;br /&gt;   case 5:&lt;br /&gt;          display(head);&lt;br /&gt;          break; &lt;br /&gt;          &lt;br /&gt;   case 6:&lt;br /&gt;          exit();&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;stu_t *insert(stu_t *head)&lt;br /&gt;{&lt;br /&gt;  int option,b4number;&lt;br /&gt;  char value='y';&lt;br /&gt;  stu_t *new,*temp,*list;&lt;br /&gt;  list=head;&lt;br /&gt;  temp=head;&lt;br /&gt;  puts("enter the option 1:bottom 2:middle 3:top");&lt;br /&gt;   scanf("%d",&amp;option);&lt;br /&gt;  switch(option)&lt;br /&gt;  {&lt;br /&gt;   case 1:&lt;br /&gt;          while(value=='y')&lt;br /&gt;          {&lt;br /&gt;           printf("enter the details");&lt;br /&gt;          scanf("%d%s%d%s",&amp;list-&gt;rollno,list-&gt;name,&amp;list-&gt;marks,list-&gt;remarks);          new=(stu_t *)malloc(sizeof(stu_t));&lt;br /&gt;          list-&gt;next=new;&lt;br /&gt;          list=new;&lt;br /&gt;           puts("enter the option you want to add another record y:yes n:no");&lt;br /&gt;           __fpurge(stdin);&lt;br /&gt;           scanf("%c",&amp;value);  &lt;br /&gt;          }            &lt;br /&gt;           if(value!='y')&lt;br /&gt;            list-&gt;next=0;&lt;br /&gt;          return head;        &lt;br /&gt;                &lt;br /&gt;   case 2: &lt;br /&gt;           while(value=='y')&lt;br /&gt;           {&lt;br /&gt;             puts("enter the position where u want to enter");&lt;br /&gt;             scanf("%d",&amp;b4number);&lt;br /&gt;             puts("enter the new fields");&lt;br /&gt;             new=(stu_t *)malloc(sizeof(stu_t));&lt;br /&gt;              scanf("%d%s%d%s",&amp;new-&gt;rollno,new-&gt;name,&amp;new-&gt;marks,new-&gt;remarks);&lt;br /&gt;             while(temp-&gt;next)&lt;br /&gt;             { &lt;br /&gt;             if(temp-&gt;rollno==b4number)&lt;br /&gt;              { &lt;br /&gt;               new-&gt;next=temp-&gt;next;&lt;br /&gt;               temp-&gt;next=new;&lt;br /&gt;              }&lt;br /&gt;              temp=temp-&gt;next;&lt;br /&gt;             } &lt;br /&gt;              puts("if you want ot add another option please press 'y'");&lt;br /&gt;              __fpurge(stdin);&lt;br /&gt;              scanf("%c",&amp;value);             &lt;br /&gt;            }&lt;br /&gt;            &lt;br /&gt;    case 3:&lt;br /&gt;            while(value=='y')&lt;br /&gt;           {&lt;br /&gt;            puts("enter the fields");&lt;br /&gt;            new=(stu_t *)malloc(sizeof(stu_t));&lt;br /&gt;            scanf("%d%s%d%s",&amp;new-&gt;rollno,new-&gt;name,&amp;new-&gt;marks,new-&gt;remarks);&lt;br /&gt;            new-&gt;next=head;&lt;br /&gt;            head=new;&lt;br /&gt;            puts("if you want ot add another option please press 'y'");&lt;br /&gt;            __fpurge(stdin);&lt;br /&gt;            scanf("%c",&amp;value);        &lt;br /&gt;           }&lt;br /&gt;           return head;      &lt;br /&gt;             &lt;br /&gt;       }&lt;br /&gt;    }       &lt;br /&gt;         &lt;br /&gt;  &lt;br /&gt;void *display(stu_t *head)&lt;br /&gt;{&lt;br /&gt; while(head-&gt;next!=0)&lt;br /&gt; {&lt;br /&gt;  printf("%d\t%s\t%d\t%s\n",head-&gt;rollno,head-&gt;name,head-&gt;marks,head-&gt;remarks);&lt;br /&gt;  head=head-&gt;next;&lt;br /&gt; }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-2371308896973214226?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/2371308896973214226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=2371308896973214226' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2371308896973214226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2371308896973214226'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/linked-lists-in-data-structures.html' title='linked lists in data structures'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-2567554464963886196</id><published>2008-01-25T16:44:00.000-08:00</published><updated>2008-01-25T16:47:08.848-08:00</updated><title type='text'>linked list operation basic program</title><content type='html'>/* pgr to write linked list operation in the linked list&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 21/08/07&lt;br /&gt;   modified on 21/08/07 */&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;//#include&lt;stdlib.h&gt;&lt;br /&gt;typedef struct linkedlist &lt;br /&gt;{&lt;br /&gt;  int number;&lt;br /&gt;  struct linkedlist *next;&lt;br /&gt;}num_t;&lt;br /&gt;&lt;br /&gt;void create(num_t *);&lt;br /&gt;void print(num_t *);&lt;br /&gt;num_t *insert(num_t *);&lt;br /&gt;num_t *find(num_t *,int);&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;  num_t  *head;&lt;br /&gt;  head=(num_t *)malloc(sizeof(num_t));&lt;br /&gt;  create(head);&lt;br /&gt;  //print(head);&lt;br /&gt;  head=insert(head);&lt;br /&gt;  print(head);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void create(num_t *list)&lt;br /&gt;{&lt;br /&gt;  printf("input a number\n");&lt;br /&gt;  printf("type -999 at a end ");&lt;br /&gt;  scanf("%d",&amp;list-&gt;number);&lt;br /&gt;   if(list -&gt; number==-999)&lt;br /&gt;   {&lt;br /&gt;     list-&gt;next=0;&lt;br /&gt;   }&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;     list-&gt;next=(num_t *)malloc(sizeof(num_t));&lt;br /&gt;     create(list -&gt;next);&lt;br /&gt;   }&lt;br /&gt;   return;&lt;br /&gt; } &lt;br /&gt; &lt;br /&gt;void print(num_t *list)&lt;br /&gt;{&lt;br /&gt;  if(list-&gt;next!=0)&lt;br /&gt;  {&lt;br /&gt;   printf("%d --&gt;",list-&gt;number);&lt;br /&gt;   print(list-&gt;next);&lt;br /&gt;  }&lt;br /&gt;  return;&lt;br /&gt;} &lt;br /&gt;  &lt;br /&gt;num_t *insert(num_t *head)&lt;br /&gt; {&lt;br /&gt;   num_t *n1;&lt;br /&gt;   int x;&lt;br /&gt;   int key;&lt;br /&gt;   num_t *new;&lt;br /&gt;   num_t *temp;&lt;br /&gt;&lt;br /&gt;   temp = head;&lt;br /&gt;   printf("enter the new value");&lt;br /&gt;   scanf("%d",&amp;x);&lt;br /&gt;   printf("enter the key value");&lt;br /&gt;   scanf("%d",&amp;key);&lt;br /&gt;   &lt;br /&gt;   if(head-&gt;number==key)&lt;br /&gt;   {&lt;br /&gt;     new=(num_t *)malloc(sizeof(num_t));&lt;br /&gt;     new-&gt;number=x;&lt;br /&gt;     new-&gt;next=head;&lt;br /&gt;     head=new;&lt;br /&gt;     return(head);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   while(temp-&gt;next)&lt;br /&gt;   {&lt;br /&gt;      if(temp-&gt; number == key)&lt;br /&gt;      {&lt;br /&gt;       new=(num_t *)malloc(sizeof(num_t));&lt;br /&gt;       new-&gt;number=x;&lt;br /&gt;       new-&gt;next=temp-&gt;next;&lt;br /&gt;       temp-&gt;next=new;&lt;br /&gt;       return head;&lt;br /&gt;      }&lt;br /&gt;      temp = temp-&gt;next;&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;   /*else&lt;br /&gt;  {&lt;br /&gt;    n1=find(head,key);&lt;br /&gt;    if(n1==0)&lt;br /&gt;     printf("key is not found");&lt;br /&gt;   else&lt;br /&gt;    {&lt;br /&gt;     new=(num_t *)malloc(sizeof(num_t));&lt;br /&gt;     new-&gt;number=x;&lt;br /&gt;     new-&gt;next=n1-&gt;next;&lt;br /&gt;     n1-&gt;next=new;&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;   return(head);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;num_t *find(num_t *list,int key)&lt;br /&gt;{&lt;br /&gt;   if(list-&gt;number==key)&lt;br /&gt;     return list;&lt;br /&gt;   else&lt;br /&gt;   if(list-&gt;next==0)&lt;br /&gt;     return 0;&lt;br /&gt;   else&lt;br /&gt;      find(list-&gt;next,key);&lt;br /&gt;}*/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-2567554464963886196?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/2567554464963886196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=2567554464963886196' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2567554464963886196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2567554464963886196'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/linked-list-operation-basic-program.html' title='linked list operation basic program'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-7107428469743127353</id><published>2008-01-25T16:42:00.000-08:00</published><updated>2008-01-25T16:44:30.526-08:00</updated><title type='text'>single Linked list operations</title><content type='html'>/* pgr to write linked list operation in the linked list&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 21/08/07&lt;br /&gt;   modified on 21/08/07 */&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;//#include&lt;stdlib.h&gt;&lt;br /&gt;typedef struct linkedlist &lt;br /&gt;{&lt;br /&gt;  int number;&lt;br /&gt;  struct linkedlist *next;&lt;br /&gt;}num_t;&lt;br /&gt;&lt;br /&gt;void create(num_t *);&lt;br /&gt;void print(num_t *);&lt;br /&gt;num_t *insert(num_t *);&lt;br /&gt;num_t *find(num_t *,int);&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;  num_t  *head;&lt;br /&gt;  head=(num_t *)malloc(sizeof(num_t));&lt;br /&gt;  create(head);&lt;br /&gt;  //print(head);&lt;br /&gt;  head=insert(head);&lt;br /&gt;  print(head);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt; void create(num_t *list)&lt;br /&gt;{&lt;br /&gt;  printf("input a number\n");&lt;br /&gt;  printf("type -999 at a end ");&lt;br /&gt;  scanf("%d",&amp;list-&gt;number);&lt;br /&gt;   if(list -&gt; number==-999)&lt;br /&gt;   {&lt;br /&gt;     list-&gt;next=0;&lt;br /&gt;   }&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;     list-&gt;next=(num_t *)malloc(sizeof(num_t));&lt;br /&gt;     create(list -&gt;next);&lt;br /&gt;   }&lt;br /&gt;   return;&lt;br /&gt; } &lt;br /&gt; &lt;br /&gt;void print(num_t *list)&lt;br /&gt;{&lt;br /&gt;  if(list-&gt;next!=0)&lt;br /&gt;  {&lt;br /&gt;   printf("%d --&gt;",list-&gt;number);&lt;br /&gt;   print(list-&gt;next);&lt;br /&gt;  }&lt;br /&gt;  return;&lt;br /&gt;} &lt;br /&gt;  &lt;br /&gt;num_t *insert(num_t *head)&lt;br /&gt; {&lt;br /&gt;   num_t *n1;&lt;br /&gt;   int x;&lt;br /&gt;   int key;&lt;br /&gt;   num_t *new;&lt;br /&gt;&lt;br /&gt;   printf("enter the new value");&lt;br /&gt;   scanf("%d",&amp;x);&lt;br /&gt;   printf("enter the key value");&lt;br /&gt;   scanf("%d",&amp;key);&lt;br /&gt;   &lt;br /&gt;   if(head-&gt;number==key)&lt;br /&gt;   {&lt;br /&gt;     new=(num_t *)malloc(sizeof(num_t));&lt;br /&gt;     new-&gt;number=x;&lt;br /&gt;     new-&gt;next=head;&lt;br /&gt;     head=new;&lt;br /&gt;   }&lt;br /&gt;   else&lt;br /&gt;  {&lt;br /&gt;    n1=find(head,key);&lt;br /&gt;    if(n1==0)&lt;br /&gt;     printf("key is not found");&lt;br /&gt;   else&lt;br /&gt;    {&lt;br /&gt;     new=(num_t *)malloc(sizeof(num_t));&lt;br /&gt;     new-&gt;number=x;&lt;br /&gt;     new-&gt;next=n1-&gt;next;&lt;br /&gt;     n1-&gt;next=new;&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;   return(head);&lt;br /&gt;  }&lt;br /&gt;  num_t *find(num_t *list,int key)&lt;br /&gt;  {&lt;br /&gt;   if(list-&gt;next-&gt;number==key)&lt;br /&gt;     return list;&lt;br /&gt;   else&lt;br /&gt;   if(list-&gt;next-&gt;next==0)&lt;br /&gt;     return 0;&lt;br /&gt;   else&lt;br /&gt;      find(list-&gt;next,key);&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-7107428469743127353?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/7107428469743127353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=7107428469743127353' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7107428469743127353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7107428469743127353'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/single-linked-list-operations.html' title='single Linked list operations'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-2700380872010540927</id><published>2008-01-25T16:37:00.000-08:00</published><updated>2008-01-25T16:42:55.865-08:00</updated><title type='text'>analysing data structures by using structures</title><content type='html'>/*analysing data structures by using structures&lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 17/08/07&lt;br /&gt;  modified on 17/08/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#define no 20&lt;br /&gt; typedef struct&lt;br /&gt; {&lt;br /&gt;  int rollno;&lt;br /&gt;  char name[20];&lt;br /&gt;  int marks;&lt;br /&gt;  char remarks[20];&lt;br /&gt; } stu_t;&lt;br /&gt;&lt;br /&gt; int insert(stu_t *);&lt;br /&gt; void display(stu_t *);&lt;br /&gt; int delete(stu_t *); &lt;br /&gt; int update(stu_t *);&lt;br /&gt;// int search(stu_t *);&lt;br /&gt; static index=0;&lt;br /&gt;&lt;br /&gt; main()&lt;br /&gt; {&lt;br /&gt;  int option,value;&lt;br /&gt;  stu_t student[no];&lt;br /&gt;   while(1)&lt;br /&gt;  {&lt;br /&gt;   puts("\nenter option for 1.insert data\n 2.delete the data \n3. update data\n4.sorting the data\n5.serching the data \n6. display the data \n7. exit");&lt;br /&gt;   puts("enter the option");&lt;br /&gt;   scanf("%d",&amp;option);&lt;br /&gt;   switch(option)&lt;br /&gt;    {&lt;br /&gt;      case 1:&lt;br /&gt;            value=insert(student);&lt;br /&gt;            if(value==0)&lt;br /&gt;              puts("operation is success");&lt;br /&gt;            else&lt;br /&gt;              puts("operation denied");&lt;br /&gt;            break;&lt;br /&gt;      case 2:&lt;br /&gt;             value=delete(student);&lt;br /&gt;             if(value==0)&lt;br /&gt;               puts("operation is success");&lt;br /&gt;             else&lt;br /&gt;               puts("operartion problem");&lt;br /&gt;             break; &lt;br /&gt;      case 3:&lt;br /&gt;             value=update(student);&lt;br /&gt;             if(value==0)&lt;br /&gt;               puts("operation is success");&lt;br /&gt;             else&lt;br /&gt;               puts("operation denied");&lt;br /&gt;             break;&lt;br /&gt;       case 4:&lt;br /&gt;             value=sort(student);&lt;br /&gt;             if(value==0)&lt;br /&gt;               puts("operation is success");&lt;br /&gt;             else&lt;br /&gt;               puts("operation is denied");&lt;br /&gt;             break; &lt;br /&gt;     /*  case 5:&lt;br /&gt;              value=search(data);&lt;br /&gt;              printf("the value you are searching in there in database  %d  times",value);&lt;br /&gt;             break;*/&lt;br /&gt;      case 6:&lt;br /&gt;            display(student);&lt;br /&gt;            break;  &lt;br /&gt;      case 7:&lt;br /&gt;             exit();&lt;br /&gt;    &lt;br /&gt;    }  &lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   int insert(stu_t *fstudent)&lt;br /&gt;   {&lt;br /&gt;     int option,i,middle,value;&lt;br /&gt;     char x='y';&lt;br /&gt;     while(1)&lt;br /&gt;     {&lt;br /&gt;     puts("\nwhere you want to insert \n 1.top 2.middle 3.bottom 4.exit");&lt;br /&gt;     puts("\nenter the option");&lt;br /&gt;     scanf("%d",&amp;option);&lt;br /&gt;      switch(option)&lt;br /&gt;       {&lt;br /&gt;         case 1:&lt;br /&gt;                while(x=='y')&lt;br /&gt;                {&lt;br /&gt;                if(index==20)&lt;br /&gt;                  return(1);&lt;br /&gt;                else&lt;br /&gt;                 {&lt;br /&gt;                   &lt;br /&gt;                  puts("enter the value");&lt;br /&gt;                   for(i=index;i&gt;0;i--)&lt;br /&gt;                     *(fstudent+i)=*(fstudent+i-1);&lt;br /&gt;                  scanf("%d%s%d%s",&amp;fstudent[0].rollno,fstudent[0].name,&amp;fstudent[0].marks,fstudent[0].remarks);            &lt;br /&gt;                  index++;&lt;br /&gt;                    puts("do u want to add another entry on top \n y or n");&lt;br /&gt;                    __fpurge(stdin);&lt;br /&gt;                    scanf("%c",&amp;x); &lt;br /&gt;                  }&lt;br /&gt;                }&lt;br /&gt;            &lt;br /&gt;              return(0);&lt;br /&gt;      case 2:&lt;br /&gt;                 while(x=='y')&lt;br /&gt;                 {&lt;br /&gt;                 if(index==20)&lt;br /&gt;                   return(1);&lt;br /&gt;                 else&lt;br /&gt;                  {&lt;br /&gt;                    puts("enter the value");&lt;br /&gt;                    puts("please enter the posion where u want to insert");&lt;br /&gt;                    scanf("%d",&amp;middle);&lt;br /&gt;                    for(i=index;i&gt;middle;i--)&lt;br /&gt;                      *(fstudent+i)=*(fstudent+i-1);&lt;br /&gt;                    scanf("%d%s%d%s",&amp;fstudent[middle].rollno,fstudent[middle].name,&amp;fstudent[middle].marks,fstudent[middle].remarks);            &lt;br /&gt;                    index++;&lt;br /&gt;                    puts("do you want to add another entry at middle");&lt;br /&gt;                    __fpurge(stdin);&lt;br /&gt;                    scanf("%c",&amp;x);&lt;br /&gt;                   }&lt;br /&gt;                  }   &lt;br /&gt;                    return(0);&lt;br /&gt;           case 3:&lt;br /&gt;                  while(x=='y')&lt;br /&gt;                  {&lt;br /&gt;                  if(index==20)&lt;br /&gt;                    return(1);&lt;br /&gt;                   else&lt;br /&gt;                   {&lt;br /&gt;                    puts("enter the value");&lt;br /&gt;                    scanf("%d%s%d%s",&amp;fstudent[index].rollno,fstudent[index].name,&amp;fstudent[index].marks,fstudent[index].remarks);            &lt;br /&gt;                    index++;&lt;br /&gt;                    puts("doyou want to add another entry at bottom y:yesn:no");                    __fpurge(stdin);&lt;br /&gt;                    scanf("%c",&amp;x);    &lt;br /&gt;                   }&lt;br /&gt;                  }&lt;br /&gt;                  return(0);&lt;br /&gt;   &lt;br /&gt;         }&lt;br /&gt;     }&lt;br /&gt;   }&lt;br /&gt;         &lt;br /&gt;&lt;br /&gt;int delete(stu_t *fstudent)&lt;br /&gt;{ &lt;br /&gt;  int i,option,middle;&lt;br /&gt;  puts("where do you want to delete entry\n 1.top 2. middle 3. bottom");&lt;br /&gt;  puts("enter the option:");&lt;br /&gt;  scanf("%d",&amp;option);&lt;br /&gt;  switch(option)&lt;br /&gt;  {&lt;br /&gt;   case 1:&lt;br /&gt;            for(i=1;i&lt;(index);i++)&lt;br /&gt;             *(fstudent+i-1)=*(fstudent+i);&lt;br /&gt;            index--;&lt;br /&gt;            return(0); &lt;br /&gt;   case 2:&lt;br /&gt;            puts("enter the position where u want to delete");&lt;br /&gt;            scanf("%d",&amp;middle);  &lt;br /&gt;            for(i=middle+1;i&lt;(index);i++)&lt;br /&gt;             *(fstudent+i-1)=*(fstudent+i);&lt;br /&gt;            index--;&lt;br /&gt;            return(0);&lt;br /&gt;             &lt;br /&gt;   case 3:&lt;br /&gt;         &lt;br /&gt;            index--;&lt;br /&gt;            return(0);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void display(stu_t *fstudent)&lt;br /&gt;{&lt;br /&gt; int i,value;&lt;br /&gt;  for(i=0;i&lt;(index);i++)&lt;br /&gt;   {&lt;br /&gt;     printf("\n%d\t%s\t%d\t%s",fstudent[i].rollno,fstudent[i].name,fstudent[i].marks,fstudent[i].remarks);&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int update(stu_t *fstudent)&lt;br /&gt;{&lt;br /&gt; int i,value;&lt;br /&gt; puts("enter the position where u want to update");&lt;br /&gt; scanf("%d",&amp;i);&lt;br /&gt;  scanf("%d%s%d%s",&amp;fstudent[i-1].rollno,fstudent[i-1].name,&amp;fstudent[i-1].marks,fstudent[i-1].remarks);&lt;br /&gt;  return 0;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int sort(stu_t *fstudent)&lt;br /&gt;{&lt;br /&gt; int i,value,a,b,option;&lt;br /&gt; stu_t x;&lt;br /&gt;  puts("select 1:name sorting 2: by marks 3: by roll nos 4:remarks ");&lt;br /&gt;  puts("enter the option");&lt;br /&gt;   scanf("%d",&amp;value);&lt;br /&gt;  switch(value)&lt;br /&gt;  {&lt;br /&gt;   case 1: &lt;br /&gt;           puts("1:ascending,2:descending");&lt;br /&gt;           puts("enter the option");&lt;br /&gt;           scanf("%d",&amp;option);&lt;br /&gt;           switch(option)&lt;br /&gt;           { &lt;br /&gt;            case 1:&lt;br /&gt;&lt;br /&gt;                   for(a=0;a&lt;=index-1;a++)&lt;br /&gt;                   {&lt;br /&gt;                    for(b=0;b&lt;a;b++)&lt;br /&gt;                     { &lt;br /&gt;                      i=0;&lt;br /&gt;                      while(fstudent[b].name[i]==fstudent[a].name[i])&lt;br /&gt;                      i++; &lt;br /&gt;                      if(fstudent[b].name[i]&gt;fstudent[a].name[i])&lt;br /&gt;                      {&lt;br /&gt;                       x=fstudent[a];&lt;br /&gt;                       fstudent[a]=fstudent[b];&lt;br /&gt;                       fstudent[b]=x;&lt;br /&gt;                      }&lt;br /&gt;                     }&lt;br /&gt;                    } &lt;br /&gt;                    return 0;&lt;br /&gt;              case 2:&lt;br /&gt;                   &lt;br /&gt;                   for(a=0;a&lt;=index-1;a++)&lt;br /&gt;                   {&lt;br /&gt;                    for(b=0;b&lt;(a);b++)&lt;br /&gt;                     { &lt;br /&gt;                      i=0;&lt;br /&gt;                      while(fstudent[b].name[i]==fstudent[a].name[i])&lt;br /&gt;                      i++; &lt;br /&gt;                      if(fstudent[b].name[i]&lt;(fstudent[a].name[i]))&lt;br /&gt;                      {&lt;br /&gt;                       x=fstudent[a];&lt;br /&gt;                       fstudent[a]=fstudent[b];&lt;br /&gt;                       fstudent[b]=x;&lt;br /&gt;                      }&lt;br /&gt;                     }&lt;br /&gt;                    } &lt;br /&gt;                    return 0;&lt;br /&gt;                   }&lt;br /&gt;       } &lt;br /&gt;     }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-2700380872010540927?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/2700380872010540927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=2700380872010540927' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2700380872010540927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2700380872010540927'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/analysing-data-structures-by-using.html' title='analysing data structures by using structures'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-2955815600947488526</id><published>2008-01-25T16:33:00.000-08:00</published><updated>2008-01-25T16:37:15.115-08:00</updated><title type='text'>pgr to impliment data structures ie insert,delete,update,sorting,display,searching</title><content type='html'>/* pgr to impliment data structures ie insert,delete,update,sorting,display,serching written by sekhar written on 16/08/07 modified on 16/08/07&lt;br /&gt;*/&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; int insert(int *);&lt;br /&gt; void display(int *);&lt;br /&gt; int delete(int *); &lt;br /&gt; int update(int *);&lt;br /&gt; int search(int *);&lt;br /&gt; static index=0;&lt;br /&gt;&lt;br /&gt; main()&lt;br /&gt; {&lt;br /&gt;  int data[20],option,value;&lt;br /&gt;   while(1)&lt;br /&gt;  {&lt;br /&gt;   puts("\nenter option for 1.insert data\n 2.delete the data \n3. update data\n4.sorting the data\n5.serching the data \n6. display the data \n7. exit");&lt;br /&gt;   puts("enter the option");&lt;br /&gt;   scanf("%d",&amp;option);&lt;br /&gt;   switch(option)&lt;br /&gt;    {&lt;br /&gt;      case 1:&lt;br /&gt;           // puts("enter the value");&lt;br /&gt;           // scanf("%d",&amp;value);            &lt;br /&gt;            value=insert(data);&lt;br /&gt;            if(value==0)&lt;br /&gt;              puts("operation is success");&lt;br /&gt;            else&lt;br /&gt;              puts("operation problem");&lt;br /&gt;            break;&lt;br /&gt;       case 2:&lt;br /&gt;             value=delete(data);&lt;br /&gt;             if(value==0)&lt;br /&gt;               puts("operation is success");&lt;br /&gt;             else&lt;br /&gt;               puts("operartion problem");&lt;br /&gt;             break; &lt;br /&gt;       case 3:&lt;br /&gt;             value=update(data);&lt;br /&gt;             if(value==0)&lt;br /&gt;               puts("operation is success");&lt;br /&gt;             else&lt;br /&gt;               puts("operation denied");&lt;br /&gt;             break;&lt;br /&gt;       case 4:&lt;br /&gt;             value=sort(data);&lt;br /&gt;             if(value==0)&lt;br /&gt;               puts("operation is success");&lt;br /&gt;             else&lt;br /&gt;               puts("operation is denied");&lt;br /&gt;             break; &lt;br /&gt;       case 5:&lt;br /&gt;              value=search(data);&lt;br /&gt;              printf("the value you are searching in there in database  %d  times",value);&lt;br /&gt;             break;&lt;br /&gt;      case 6:&lt;br /&gt;            display(data);&lt;br /&gt;            break;  &lt;br /&gt;      case 7:&lt;br /&gt;             exit();&lt;br /&gt;    }&lt;br /&gt;  } &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   int insert(int *fdata)&lt;br /&gt;   {&lt;br /&gt;     int option,i,middle,value;&lt;br /&gt;     char x='y';&lt;br /&gt;     while(1)&lt;br /&gt;     {&lt;br /&gt;     puts("\nwhere you want to insert \n 1.top 2.middle 3.bottom 4.exit");&lt;br /&gt;     puts("\nenter the option");&lt;br /&gt;     scanf("%d",&amp;option);&lt;br /&gt;      switch(option)&lt;br /&gt;       {&lt;br /&gt;         case 1:&lt;br /&gt;                while(x=='y')&lt;br /&gt;                {&lt;br /&gt;                if(index==20)&lt;br /&gt;                  return(1);&lt;br /&gt;                else&lt;br /&gt;                 {&lt;br /&gt;                   &lt;br /&gt;                  puts("enter the value");&lt;br /&gt;                  scanf("%d",&amp;value);            &lt;br /&gt;                   for(i=index;i&gt;0;i--)&lt;br /&gt;                     *(fdata+i)=*(fdata+i-1);&lt;br /&gt;                    fdata[0]=value;&lt;br /&gt;                    index++;&lt;br /&gt;                    puts("do u want to add another entry on top \n y or n");&lt;br /&gt;                    __fpurge(stdin);&lt;br /&gt;                    scanf("%c",&amp;x); &lt;br /&gt;                  }&lt;br /&gt;                }&lt;br /&gt;                  return(0);  &lt;br /&gt;          case 2:&lt;br /&gt;                 while(x=='y')&lt;br /&gt;                 {&lt;br /&gt;                 if(index==20)&lt;br /&gt;                   return(1);&lt;br /&gt;                 else&lt;br /&gt;                  {&lt;br /&gt;                    puts("enter the value");&lt;br /&gt;                    scanf("%d",&amp;value);            &lt;br /&gt;                    puts("please enter the posion where u want to insert");&lt;br /&gt;                    scanf("%d",&amp;middle);&lt;br /&gt;                    for(i=index;i&gt;middle;i--)&lt;br /&gt;                     *(fdata+i)=*(fdata+i-1);&lt;br /&gt;                    fdata[middle]=value;&lt;br /&gt;                    index++;&lt;br /&gt;                    puts("do you want to add another entry at middle");&lt;br /&gt;                    __fpurge(stdin);&lt;br /&gt;                    scanf("%c",&amp;x);&lt;br /&gt;                   }&lt;br /&gt;                  }   &lt;br /&gt;                    return(0);&lt;br /&gt;           case 3:&lt;br /&gt;                  while(x=='y')&lt;br /&gt;                  {&lt;br /&gt;                  if(index==20)&lt;br /&gt;                    return(1);&lt;br /&gt;                   else&lt;br /&gt;                   {&lt;br /&gt;                    puts("enter the value");&lt;br /&gt;                    scanf("%d",&amp;value);            &lt;br /&gt;                     fdata[index]=value;&lt;br /&gt;                     index++;&lt;br /&gt;                    puts("doyou want to add another entry at bottom y:yesn:no");                    __fpurge(stdin);&lt;br /&gt;                    scanf("%c",&amp;x);    &lt;br /&gt;                   }&lt;br /&gt;                  }&lt;br /&gt;                  return(0);&lt;br /&gt;   &lt;br /&gt;         }&lt;br /&gt;     }&lt;br /&gt;   }&lt;br /&gt;int delete(int *fdata)&lt;br /&gt;{ &lt;br /&gt;  int i,option,middle;&lt;br /&gt;  puts("where do you want to delete entry\n 1.top 2. middle 3. bottom");&lt;br /&gt;  puts("enter the option:");&lt;br /&gt;  scanf("%d",&amp;option);&lt;br /&gt;  switch(option)&lt;br /&gt;  {&lt;br /&gt;   case 1:&lt;br /&gt;            for(i=0;i&lt;(index);i++)&lt;br /&gt;             *(fdata+i-1)=*(fdata+i);&lt;br /&gt;            index--;&lt;br /&gt;            return(0); &lt;br /&gt;   case 2:&lt;br /&gt;            puts("enter the position where u want to delete");&lt;br /&gt;            scanf("%d",&amp;middle);  &lt;br /&gt;            for(i=middle;i&lt;(index);i++)&lt;br /&gt;             *(fdata+i-1)=*(fdata+i);&lt;br /&gt;            index--;&lt;br /&gt;            return(0);&lt;br /&gt;             &lt;br /&gt;   case 3:&lt;br /&gt;         &lt;br /&gt;            index--;&lt;br /&gt;            return(0);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int update(int *fdate)&lt;br /&gt;{&lt;br /&gt; int position,value;&lt;br /&gt;  puts("enter the position where you want to update");&lt;br /&gt;  scanf("%d",&amp;position);&lt;br /&gt;  puts("enter the new value");&lt;br /&gt;  scanf("%d",&amp;value);&lt;br /&gt; fdate[position]=value;&lt;br /&gt; return(0);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int sort(int *fdata)&lt;br /&gt; {&lt;br /&gt;  int option,i,j,x;&lt;br /&gt;  puts("enter the option 1:ascending 2:descending");&lt;br /&gt;  scanf("%d",&amp;option);&lt;br /&gt;  switch(option)&lt;br /&gt;  {&lt;br /&gt;    case 1:&lt;br /&gt;           for(i=0;i&lt;(index);i++)&lt;br /&gt;            {&lt;br /&gt;             for(j=0;j&lt;=i;j++)&lt;br /&gt;             {&lt;br /&gt;              if(fdata[i]&lt;=fdata[j])&lt;br /&gt;              {&lt;br /&gt;               x=fdata[i];&lt;br /&gt;               fdata[i]=fdata[j];&lt;br /&gt;               fdata[j]=x;&lt;br /&gt;              }&lt;br /&gt;             }&lt;br /&gt;            } &lt;br /&gt;             return(0);&lt;br /&gt;    case 2: &lt;br /&gt;           for(i=0;i&lt;(index);i++)&lt;br /&gt;            {&lt;br /&gt;             for(j=0;j&lt;=i;j++)&lt;br /&gt;             {&lt;br /&gt;              if(fdata[i]&gt;=fdata[j])&lt;br /&gt;              {&lt;br /&gt;               x=fdata[i];&lt;br /&gt;               fdata[i]=fdata[j];&lt;br /&gt;               fdata[j]=x;&lt;br /&gt;              }&lt;br /&gt;             }&lt;br /&gt;            } &lt;br /&gt;             return(0);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int search(int *fdata)&lt;br /&gt;{&lt;br /&gt;  int value,incr=0,i;&lt;br /&gt;  puts("what for you are seaching \n enter value here");&lt;br /&gt;  scanf("%d",&amp;value);&lt;br /&gt;  for(i=0;i&lt;=index;i++)&lt;br /&gt;  {&lt;br /&gt;   if(fdata[i]==value)&lt;br /&gt;      incr++;&lt;br /&gt;  }&lt;br /&gt;  return incr;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void display(int *fdata)&lt;br /&gt;{&lt;br /&gt; int i,value;&lt;br /&gt;  for(i=0;i&lt;(index);i++)&lt;br /&gt;   {&lt;br /&gt;     printf("\ndata[%d]=%d",i,fdata[i]);&lt;br /&gt;   }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-2955815600947488526?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/2955815600947488526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=2955815600947488526' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2955815600947488526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2955815600947488526'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/pgr-to-impliment-data-structures-ie.html' title='pgr to impliment data structures ie insert,delete,update,sorting,display,searching'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-3522313948327544333</id><published>2008-01-25T16:31:00.000-08:00</published><updated>2008-01-25T16:33:46.660-08:00</updated><title type='text'>Program on union</title><content type='html'>/* pgr to know about union &lt;br /&gt; written by sekhar&lt;br /&gt; written on 13/08/07&lt;br /&gt;*/&lt;br /&gt;  #include&lt;stdio.h&gt;&lt;br /&gt;  typedef struct&lt;br /&gt;  {&lt;br /&gt;   int empid;&lt;br /&gt;   char name[20];&lt;br /&gt;   int basic;&lt;br /&gt;   }emp_t;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  typedef struct&lt;br /&gt;  {&lt;br /&gt;   int sturollno;&lt;br /&gt;   char stuname[20];&lt;br /&gt;   int marks;&lt;br /&gt;  }stu_t;&lt;br /&gt; &lt;br /&gt;typedef union&lt;br /&gt; {&lt;br /&gt;  emp_t e;&lt;br /&gt;  stu_t s;&lt;br /&gt; }u_t;&lt;br /&gt;void display(u_t ,int);&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;  u_t u;&lt;br /&gt; printf("employee details");&lt;br /&gt; scanf("%d%s%d",&amp;u.e.empid,&amp;u.e.name,&amp;u.e.basic);&lt;br /&gt; printf("student detais");&lt;br /&gt; scanf("%d%s%d",&amp;u.s.sturollno,&amp;u.s.stuname,&amp;u.s.marks);&lt;br /&gt; display(u,2);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void display(u_t u,int option)&lt;br /&gt;{&lt;br /&gt; switch(option)&lt;br /&gt; {&lt;br /&gt;  case 1:&lt;br /&gt;         printf("%d%s%d",u.e.empid,u.e.name,u.e.basic);&lt;br /&gt;         break;&lt;br /&gt;  case 2:&lt;br /&gt;        printf("%d%s%d",u.s.sturollno,u.s.stuname,u.s.marks);&lt;br /&gt;        break;&lt;br /&gt; }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-3522313948327544333?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/3522313948327544333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=3522313948327544333' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3522313948327544333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3522313948327544333'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/program-on-union.html' title='Program on union'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-126760743430850294</id><published>2008-01-25T16:29:00.002-08:00</published><updated>2008-01-25T16:31:30.104-08:00</updated><title type='text'>Update time aswellas date</title><content type='html'>#include&lt;stdio.h&gt;&lt;br /&gt;//global variable&lt;br /&gt;typedef struct&lt;br /&gt;{ int sec;&lt;br /&gt;  int min;&lt;br /&gt;  int hour;&lt;br /&gt;  int day;&lt;br /&gt;  int month;&lt;br /&gt;  int year;&lt;br /&gt;}time_t;&lt;br /&gt;//header files&lt;br /&gt;int noofday(time_t d);&lt;br /&gt;int leapyear(time_t d);&lt;br /&gt;time_t update_time(time_t ,time_t );&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;  time_t present,next;&lt;br /&gt;  printf("enter today's date&amp;time(yyyy/mm/dd/hh/mm/ss");&lt;br /&gt;  scanf("%d%d%d%d%d%d",&amp;present.year,&amp;present.month,&amp;present.day,&amp;present.hour,&amp;present.min,&amp;present.sec);&lt;br /&gt;   while(1)&lt;br /&gt;   {&lt;br /&gt;   present=update_time(present,next);&lt;br /&gt;   sleep(1);&lt;br /&gt;   printf("\n%d:%d:%d:%d:%d:%d",present.year,present.month,present.day,present.hour,present.min,present.sec);&lt;br /&gt;  if(present.year==9999)&lt;br /&gt;   exit();&lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int noofday(time_t d)&lt;br /&gt;{&lt;br /&gt;  int array[]={0,31,28,31,30,31,30,31,31,30,31,30,31};&lt;br /&gt;  int ans;&lt;br /&gt;  if((d.month==2)&amp;&amp;leapyear(d))&lt;br /&gt;  {&lt;br /&gt;     ans=29;&lt;br /&gt;  }&lt;br /&gt;  else&lt;br /&gt;     ans=array[d.month];&lt;br /&gt;  return(ans);&lt;br /&gt;}&lt;br /&gt;/* function used for leap year  */&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;int leapyear(time_t d)&lt;br /&gt;{&lt;br /&gt;  int flag;&lt;br /&gt;  if((d.year%4==0)&amp;&amp;((d.year%100!=0)||(d.year%400==0)))&lt;br /&gt;    flag=1;&lt;br /&gt;  else&lt;br /&gt;    flag=0;&lt;br /&gt;  return(flag);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;time_t update_time(time_t time1,time_t time2)&lt;br /&gt;  {&lt;br /&gt;    if(time1.sec!=59)&lt;br /&gt;     {&lt;br /&gt;       time2.sec=time1.sec+1;&lt;br /&gt;       time2.min=time1.min;&lt;br /&gt;       time2.hour=time1.hour;&lt;br /&gt;       time2.day=time1.day;&lt;br /&gt;       time2.month=time1.month;&lt;br /&gt;       time2.year=time1.year;&lt;br /&gt;     }&lt;br /&gt;    else&lt;br /&gt;     {&lt;br /&gt;       if(time1.min!=59)&lt;br /&gt;       {&lt;br /&gt;         time2.sec=0;&lt;br /&gt;         time2.min=time1.min+1;&lt;br /&gt;         time2.hour=time1.hour;&lt;br /&gt;         time2.day=time1.day;&lt;br /&gt;         time2.month=time1.month;&lt;br /&gt;         time2.year=time1.year;&lt;br /&gt;       }&lt;br /&gt;       else&lt;br /&gt;        {&lt;br /&gt;         if(time1.hour!=23)&lt;br /&gt;          {&lt;br /&gt;           time2.sec=0;&lt;br /&gt;           time2.min=0;&lt;br /&gt;           time2.hour=time1.hour+1;&lt;br /&gt;           time2.day=time1.day;&lt;br /&gt;           time2.month=time1.month;&lt;br /&gt;           time2.year=time1.year;&lt;br /&gt;          }&lt;br /&gt;         else&lt;br /&gt;          {&lt;br /&gt;           if(time1.day!=noofday(time1))&lt;br /&gt;            { &lt;br /&gt;            time2.sec=0;&lt;br /&gt;            time2.min=0;&lt;br /&gt;            time2.hour=0; &lt;br /&gt;            time2.day=time1.day+1;&lt;br /&gt;            time2.month=time1.month;  &lt;br /&gt;            time2.year=time1.year;&lt;br /&gt;            }&lt;br /&gt;           else &lt;br /&gt;             if(time1.month==12)&lt;br /&gt;             {  //end of the year&lt;br /&gt;              time2.sec=0;&lt;br /&gt;              time2.min=0;&lt;br /&gt;              time2.hour=0; &lt;br /&gt;              time2.day=1;&lt;br /&gt;              time2.month=1;&lt;br /&gt;              time2.year=time1.year+1;&lt;br /&gt;             }&lt;br /&gt;             else&lt;br /&gt;             {  // end of month&lt;br /&gt;              time2.sec=0;&lt;br /&gt;              time2.min=0;&lt;br /&gt;              time2.hour=0; &lt;br /&gt;              time2.day=1;&lt;br /&gt;              time2.month=time1.month+1;&lt;br /&gt;              time2.year=time1.year;&lt;br /&gt;             }&lt;br /&gt;           }&lt;br /&gt;          }&lt;br /&gt;         }&lt;br /&gt;         return time2;&lt;br /&gt;       }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-126760743430850294?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/126760743430850294/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=126760743430850294' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/126760743430850294'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/126760743430850294'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/update-time-aswellas-date.html' title='Update time aswellas date'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-206784592122638968</id><published>2008-01-25T16:29:00.001-08:00</published><updated>2008-01-25T16:29:51.471-08:00</updated><title type='text'>display content of a file on screen</title><content type='html'>/*display content of a file on screen*/&lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt; main()&lt;br /&gt; { &lt;br /&gt;   FILE *fp;&lt;br /&gt;   char ch;&lt;br /&gt;&lt;br /&gt;   fp=fopen("sania.bit","r");&lt;br /&gt;   while(1)&lt;br /&gt;   { &lt;br /&gt;     ch=fgetc(fp);&lt;br /&gt;     if(ch==EOF)&lt;br /&gt;       break;&lt;br /&gt; &lt;br /&gt;     printf("%d",ch);&lt;br /&gt;   }&lt;br /&gt;   fclose(fp);&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-206784592122638968?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/206784592122638968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=206784592122638968' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/206784592122638968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/206784592122638968'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/display-content-of-file-on-screen.html' title='display content of a file on screen'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-1052420181249614338</id><published>2008-01-25T16:28:00.000-08:00</published><updated>2008-01-25T16:29:03.777-08:00</updated><title type='text'>Update the date</title><content type='html'>#include&lt;stdio.h&gt;&lt;br /&gt;//global variable&lt;br /&gt;typedef struct&lt;br /&gt;{&lt;br /&gt;  int day;&lt;br /&gt;  int month;&lt;br /&gt;  int year;&lt;br /&gt;}date;&lt;br /&gt;//header files&lt;br /&gt;int noofday(date d);&lt;br /&gt;int leapyear(date d);&lt;br /&gt;int main()&lt;br /&gt;{&lt;br /&gt;  date today,tomorrow;&lt;br /&gt;  printf("enter today's date(dd/mm/yyyy);");&lt;br /&gt;  scanf("%d%d%d",&amp;today.day,&amp;today.month,&amp;today.year);&lt;br /&gt;if(today.day!=noofday(today))&lt;br /&gt;{  //cheking for middle of month&lt;br /&gt;  tomorrow.day=today.day+1;&lt;br /&gt;  tomorrow.month=today.month;  &lt;br /&gt;  tomorrow.year=today.year;&lt;br /&gt;}&lt;br /&gt;else if(today.month==12)&lt;br /&gt;{  //end of the year&lt;br /&gt;  tomorrow.day=1;&lt;br /&gt;  tomorrow.month=1;&lt;br /&gt;  tomorrow.year=today.year+1;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{  // end of month&lt;br /&gt;  tomorrow.day=1;&lt;br /&gt;  tomorrow.month=today.month+1;&lt;br /&gt;  tomorrow.year=today.year;&lt;br /&gt;}&lt;br /&gt;printf("%d day: %d month: %d yaer:",tomorrow.day,tomorrow.month,tomorrow.year);&lt;br /&gt;}  //end of main&lt;br /&gt;/*calculating number of days per month */&lt;br /&gt;int noofday(date d)&lt;br /&gt;{&lt;br /&gt;  int array[]={0,31,28,31,30,31,30,31,31,30,31,30,31};&lt;br /&gt;  int ans;&lt;br /&gt;  if((d.month==2)&amp;&amp;leapyear(d))&lt;br /&gt;  {&lt;br /&gt;     ans=29;&lt;br /&gt;  }&lt;br /&gt;  else&lt;br /&gt;     ans=array[d.month];&lt;br /&gt;  return(ans);&lt;br /&gt;}&lt;br /&gt;/* function used for leap year  */&lt;br /&gt;int leapyear(date d)&lt;br /&gt;{&lt;br /&gt;  int flag;&lt;br /&gt;  if((d.year%4==0)&amp;&amp;((d.year%100!=0)||(d.year%400==0)))&lt;br /&gt;    flag=1;&lt;br /&gt;  else&lt;br /&gt;    flag=0;&lt;br /&gt;  return(flag);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-1052420181249614338?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/1052420181249614338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=1052420181249614338' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1052420181249614338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1052420181249614338'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/update-date.html' title='Update the date'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-3672533424984137939</id><published>2008-01-25T16:26:00.001-08:00</published><updated>2008-01-25T16:26:35.317-08:00</updated><title type='text'>using structures in function</title><content type='html'>/* pgr use functions in structures &lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 07/07/08&lt;br /&gt;   modified on 07/07/08*/&lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt;  typedef struct emp       // secondary datatype stuct emp act like a varible int&lt;br /&gt;   {&lt;br /&gt;     int id;&lt;br /&gt;     char name[20];&lt;br /&gt;     int basic;&lt;br /&gt;     float hra;&lt;br /&gt;     float ta;&lt;br /&gt;     float net;&lt;br /&gt;   };&lt;br /&gt;   void get_details(struct emp*);&lt;br /&gt;   void display(struct emp*);&lt;br /&gt;   void net_sal(struct emp*);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   main()&lt;br /&gt;   {&lt;br /&gt;     struct emp e[10];   // declaration here stuct emp act like primary e like a variable&lt;br /&gt;     get_details(e);     //call the fuction address of intial memory location&lt;br /&gt;     net_sal(e);&lt;br /&gt;   }&lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;  void get_details(struct emp *a)&lt;br /&gt;   {&lt;br /&gt;     int i;&lt;br /&gt;     for(i=0;i&lt;=2;i++)&lt;br /&gt;     scanf("%d%s%d%f%f",&amp;a[i].id,a[i].name,&amp;a[i].basic,&amp;a[i].hra,&amp;a[i].ta);&lt;br /&gt;   }&lt;br /&gt;  &lt;br /&gt; &lt;br /&gt;   void net_sal(struct emp *b)&lt;br /&gt;   {&lt;br /&gt;     int i;&lt;br /&gt;     for(i=0;i&lt;=2;i++)&lt;br /&gt;     {&lt;br /&gt;     b[i].net=b[i].basic+b[i].hra+b[i].ta;&lt;br /&gt;      printf("%d\t%s\t%d\t%f\t%f\t%f\n",b[i].id,b[i].name,b[i].basic,b[i].hra,b[i].ta,b[i].net);&lt;br /&gt;   }&lt;br /&gt;    &lt;br /&gt;   &lt;br /&gt;&lt;br /&gt; &lt;br /&gt;       &lt;br /&gt;    &lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-3672533424984137939?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/3672533424984137939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=3672533424984137939' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3672533424984137939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3672533424984137939'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/using-structures-in-function.html' title='using structures in function'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-3103360325454359814</id><published>2008-01-25T16:25:00.001-08:00</published><updated>2008-01-25T16:25:36.353-08:00</updated><title type='text'>Size of structres</title><content type='html'>/* Pgr to write structures find the size of the stuctures&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 08/07/08&lt;br /&gt;  */&lt;br /&gt;   #include&lt;stdio.h&gt;&lt;br /&gt;   main()&lt;br /&gt;   {&lt;br /&gt;     typedef struct emp &lt;br /&gt;      {&lt;br /&gt;        int x;               //it will take 4 bytes &lt;br /&gt;        long double y;       // it will take 12 bytes&lt;br /&gt;        char z;              // it will take 1 byte in normal but here allocate 4 byte for this due to allign ment    &lt;br /&gt;      };  &lt;br /&gt;     struct emp e;&lt;br /&gt;       printf("%d",sizeof(e));&lt;br /&gt;    }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-3103360325454359814?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/3103360325454359814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=3103360325454359814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3103360325454359814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3103360325454359814'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/size-of-structres.html' title='Size of structres'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-4186380261861001494</id><published>2008-01-25T16:22:00.000-08:00</published><updated>2008-01-25T16:23:23.380-08:00</updated><title type='text'>Programe to update time by 1 sec</title><content type='html'>/*pgr to update time by 1 sec&lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 08/08/07&lt;br /&gt;  modified on 08/08/07 */&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; typedef struct&lt;br /&gt; {&lt;br /&gt;  int sec;&lt;br /&gt;  int min;&lt;br /&gt;  int hours;&lt;br /&gt; }time_t;&lt;br /&gt;void update_time(time_t *,time_t *);&lt;br /&gt;&lt;br /&gt; main()&lt;br /&gt; {&lt;br /&gt;  time_t present,updated;&lt;br /&gt;   puts("enter the present time in hh:mm:ss");&lt;br /&gt;   scanf("%d%d%d",&amp;present.hours,&amp;present.min,&amp;present.sec);&lt;br /&gt;   printf("%d:%d:%d",present.hours,present.min,present.sec);&lt;br /&gt;  // while(1)&lt;br /&gt;  // {&lt;br /&gt;   update_time(&amp;present,&amp;updated);&lt;br /&gt;   printf("\n%d:%d:%d",updated.hours,updated.min,updated.sec);&lt;br /&gt;  // present=updated;&lt;br /&gt;  // if(present.hours==13)&lt;br /&gt;  // exit();&lt;br /&gt;  // }&lt;br /&gt; }&lt;br /&gt;  &lt;br /&gt; void update_time(time_t *time1,time_t *time2)&lt;br /&gt;  {&lt;br /&gt;    if(time1-&gt;sec!=59)&lt;br /&gt;     {&lt;br /&gt;       time2-&gt;sec=time1-&gt;sec+1;&lt;br /&gt;       time2-&gt;min=time1-&gt;min;&lt;br /&gt;       time2-&gt;hours=time1-&gt;hours;&lt;br /&gt;     }&lt;br /&gt;    else&lt;br /&gt;     {&lt;br /&gt;       if(time1-&gt;min!=59)&lt;br /&gt;       {&lt;br /&gt;         time2-&gt;sec=0;&lt;br /&gt;         time2-&gt;min=time1-&gt;min+1;&lt;br /&gt;         time2-&gt;hours=time1-&gt;hours;&lt;br /&gt;       }&lt;br /&gt;       else&lt;br /&gt;       {&lt;br /&gt;         time2-&gt;sec=0;&lt;br /&gt;         time2-&gt;min=0;&lt;br /&gt;         time2-&gt;hours=time1-&gt;hours+1;&lt;br /&gt;       }&lt;br /&gt;     }&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-4186380261861001494?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/4186380261861001494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=4186380261861001494' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4186380261861001494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4186380261861001494'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/programe-to-update-time-by-1-sec.html' title='Programe to update time by 1 sec'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-7567820946908157608</id><published>2008-01-20T06:58:00.000-08:00</published><updated>2008-01-20T07:00:27.480-08:00</updated><title type='text'>use multi pointers</title><content type='html'>/*pg rto use multi pointers &lt;br /&gt; written by sekhar&lt;br /&gt; written on 06/07/08*/&lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt; int product_p1(int *,int *);&lt;br /&gt; int product_p2(int **,int **);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;   int value1,value2,*p1,*p2,y;&lt;br /&gt;   p1=&amp;value1;&lt;br /&gt;   p2=&amp;value2;&lt;br /&gt;  scanf("%d%d",&amp;value1,&amp;value2);&lt;br /&gt;  y=product_p1(p1,p2);&lt;br /&gt;     printf("%d\n%d\n%d",*p1,*p2,y);&lt;br /&gt;  }&lt;br /&gt;   int product_p1(int *value3,int *value4)&lt;br /&gt;  {&lt;br /&gt;    int **p3,**p4,x;&lt;br /&gt;   p3=&amp;value3;&lt;br /&gt;   p4=&amp;value4;&lt;br /&gt;  x=product_p2(p3,p4);&lt;br /&gt;    return x;&lt;br /&gt;  }&lt;br /&gt;  int product_p2(int **value5,int **value6)&lt;br /&gt; {&lt;br /&gt;   int z;&lt;br /&gt;    z=**value5***value6;&lt;br /&gt;    return z;&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-7567820946908157608?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/7567820946908157608/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=7567820946908157608' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7567820946908157608'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7567820946908157608'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/use-multi-pointers.html' title='use multi pointers'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-678302300936426260</id><published>2008-01-20T06:50:00.001-08:00</published><updated>2008-01-20T06:58:34.159-08:00</updated><title type='text'>make file</title><content type='html'>/* pgr to make file using stings&lt;br /&gt;   main pgr&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 03/08/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#define size 40&lt;br /&gt;int str_len(char *); &lt;br /&gt;void str_cpy(char *,char *);&lt;br /&gt;void str_cat(char *,char *);&lt;br /&gt;void str_rev(char *);&lt;br /&gt;int str_word_count(char *);&lt;br /&gt;int str_cmp(char *,char *); &lt;br /&gt;main()&lt;br /&gt; {&lt;br /&gt;   int option,len,count,comp;&lt;br /&gt;   char str1[size],str2[size];&lt;br /&gt;  while(1)&lt;br /&gt;  {&lt;br /&gt;   puts("\n1:str_len  2:strcpy 3:strconcat  4:strrev 5:strwordcount 6:exit");&lt;br /&gt;   puts("\nenter the option:");&lt;br /&gt;     scanf("%d",&amp;option);&lt;br /&gt;   switch(option)&lt;br /&gt;    {&lt;br /&gt;     case 1:&lt;br /&gt;            puts("enter the string:");&lt;br /&gt;            __fpurge(stdin);&lt;br /&gt;            gets(str1);&lt;br /&gt;           len=str_len(str1);&lt;br /&gt;             printf("%d",len);&lt;br /&gt;            break;&lt;br /&gt;     case 2:&lt;br /&gt;              puts("enter the source sting to copy"); &lt;br /&gt;            __fpurge(stdin);&lt;br /&gt;              gets(str1);&lt;br /&gt;            str_cpy(str1,str2);   //str1 is source str2 is destination &lt;br /&gt;              puts(str2);&lt;br /&gt;            break;&lt;br /&gt;     case 3:&lt;br /&gt;              puts("enter the first string:");&lt;br /&gt;            __fpurge(stdin);&lt;br /&gt;              gets(str1);&lt;br /&gt;              puts("enter the second string:");&lt;br /&gt;            __fpurge(stdin);&lt;br /&gt;              gets(str2);&lt;br /&gt;            str_cat(str1,str2); //str1 &amp; str2 is concate nate result in str1 &lt;br /&gt;              puts(str1);&lt;br /&gt;            break; &lt;br /&gt;      case 4:&lt;br /&gt;               puts("enter the string foe reversing");&lt;br /&gt;             __fpurge(stdin);&lt;br /&gt;               gets(str1);&lt;br /&gt;             str_rev(str1);&lt;br /&gt;               puts(str1);  &lt;br /&gt;             break;&lt;br /&gt;      case 5:&lt;br /&gt;               puts("enter the string for word count");&lt;br /&gt;             __fpurge(stdin);&lt;br /&gt;               gets(str1);&lt;br /&gt;             count=str_word_count(str1);&lt;br /&gt;               printf("%d",count);&lt;br /&gt;             break;      &lt;br /&gt;      case 6:&lt;br /&gt;               puts("enter the first string");&lt;br /&gt;             __fpurge(stdin);&lt;br /&gt;               gets(str1);&lt;br /&gt;               puts("enter the second string");&lt;br /&gt;             __fpurge(stdin);&lt;br /&gt;               gets(str2);&lt;br /&gt;             comp=str_cmp(str1,str2);&lt;br /&gt;               printf("%d",comp);&lt;br /&gt;             break;   &lt;br /&gt;                   &lt;br /&gt;      case 7:&lt;br /&gt;            exit();&lt;br /&gt;    } &lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* function for string concatination &lt;br /&gt;   two string concatenate and result will be stored first string&lt;br /&gt;   written by sekhar &lt;br /&gt;   written on 03/08/07&lt;br /&gt;   modified on 03/08/07 */&lt;br /&gt;  void str_cat(char *s1,char *s2) //concatenate and store is s1&lt;br /&gt;  {&lt;br /&gt;    int y;&lt;br /&gt;    y=str_len(s1);//copy function calling  source and destination is same       &lt;br /&gt;      str_cpy(s2,s1+y);//same as above&lt;br /&gt;   } &lt;br /&gt;&lt;br /&gt;/* function to compare two strings&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 03/08/07&lt;br /&gt;   modified on 03/08/07 */&lt;br /&gt; &lt;br /&gt;  int str_cmp(char *s1,char *s2)&lt;br /&gt;    {&lt;br /&gt;      int value=0,i;&lt;br /&gt;        while(*++s1!='\0'&amp;&amp;*++s2!='\0')&lt;br /&gt;         {&lt;br /&gt;           value=*s1-*s2;&lt;br /&gt;          }&lt;br /&gt;         if(value&gt;0)&lt;br /&gt;          i=1;&lt;br /&gt;         if(value&lt;0)&lt;br /&gt;          i=-1;&lt;br /&gt;         if(value==0)&lt;br /&gt;           i=0;  &lt;br /&gt;&lt;br /&gt;       return i;&lt;br /&gt;     } &lt;br /&gt;/* pgr for function of string copy&lt;br /&gt;   first string is source string second is destination string &lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 03/08/07 */&lt;br /&gt;void str_cpy(char *source, char *desti)&lt;br /&gt; {&lt;br /&gt;    while(*source!='\0')&lt;br /&gt;     *desti++=*source++;&lt;br /&gt;     *desti='\0';&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;/*function to find str length&lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 03/08/07&lt;br /&gt;  modified on 03/08/07&lt;br /&gt;*/&lt;br /&gt;int str_len(char * s1)&lt;br /&gt; {&lt;br /&gt;   int count=0;&lt;br /&gt;   while(*s1++!='\0')&lt;br /&gt;    {&lt;br /&gt;     count++;&lt;br /&gt;    }&lt;br /&gt;   return count;&lt;br /&gt;  } &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/* function for reversing the sting &lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 03/07/08&lt;br /&gt;*/&lt;br /&gt; void str_rev(char *s1)&lt;br /&gt;  {  &lt;br /&gt;    char len,i=0;&lt;br /&gt;    char s2[40];&lt;br /&gt;     str_cpy(s1,s2);&lt;br /&gt;    len=str_len(s1);&lt;br /&gt;    for(;len&gt;0;len,i)&lt;br /&gt;     {&lt;br /&gt;      s1[--len]=*(s2+i);&lt;br /&gt;      i++;&lt;br /&gt;     } &lt;br /&gt;    // s1[len]='\0';&lt;br /&gt;  }&lt;br /&gt;/* pgr to count the no words in the sting&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 03/07/08&lt;br /&gt;   modified on 03/07/08*/&lt;br /&gt;int str_word_count(char *s1)&lt;br /&gt;  {&lt;br /&gt;    int cou=1;&lt;br /&gt;   while(*s1++!='\0')&lt;br /&gt;    {&lt;br /&gt;      if(*s1==' ')&lt;br /&gt;        cou++;&lt;br /&gt;     }&lt;br /&gt;    return cou;&lt;br /&gt;   }&lt;br /&gt;       &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   strout: main.o strlen.o strcpy.o strcat.o strrev.o strwordcount.o strcmp.o&lt;br /&gt; $ gcc -o strout main.o strlen.o strcpy.o strcat.o strrev.o strwordcount.o strcmp.o&lt;br /&gt;main.o: main.c&lt;br /&gt; $ gcc -c main.c&lt;br /&gt;strlen.o: strlen.c&lt;br /&gt; $ gcc -c strlen.c&lt;br /&gt;strcpy.o: strcpy.c&lt;br /&gt; $ gcc -c strcpy.c&lt;br /&gt;strcat.o: strcat.c&lt;br /&gt; $ gcc -c strcat.c&lt;br /&gt;strrev.o: strrev.c&lt;br /&gt; $ gcc -c strrev.c&lt;br /&gt;strwordcount: strwordcount.c&lt;br /&gt; $ gcc -c strwordcount.c&lt;br /&gt;strcmp: strcmp.c&lt;br /&gt; $ gcc -c strcmp.c&lt;br /&gt;clean:&lt;br /&gt; $ rm -rf *.o&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-678302300936426260?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/678302300936426260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=678302300936426260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/678302300936426260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/678302300936426260'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/make-file.html' title='make file'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-5128300555445375632</id><published>2008-01-20T06:49:00.000-08:00</published><updated>2008-01-20T06:50:20.755-08:00</updated><title type='text'>programe to use switch statement</title><content type='html'>/*tatement programe to use switch statement &lt;br /&gt;   written on 05/07/07&lt;br /&gt;   modified date 05/07/07&lt;br /&gt;   written by sekhar */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;&lt;br /&gt;#include&lt;stdio_ext.h&gt;&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;   char ch;&lt;br /&gt;  while(1)&lt;br /&gt; {&lt;br /&gt;     printf("enter the charecter");&lt;br /&gt;     __fpurge(stdin);&lt;br /&gt;     // fflush(stdin);&lt;br /&gt;     scanf("%c",&amp;ch);&lt;br /&gt;   switch(ch)&lt;br /&gt;   {&lt;br /&gt;     case 'a':&lt;br /&gt;       printf(" execution of first programe ");&lt;br /&gt;     break;&lt;br /&gt;     case 'b':&lt;br /&gt;       printf(" execution of second programe");&lt;br /&gt;     break;&lt;br /&gt;     default:&lt;br /&gt;       exit();&lt;br /&gt;     &lt;br /&gt;   }                                // switch statement ends&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-5128300555445375632?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/5128300555445375632/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=5128300555445375632' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5128300555445375632'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5128300555445375632'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/programe-to-use-switch-statement.html' title='programe to use switch statement'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-7486586943225738428</id><published>2008-01-20T06:48:00.000-08:00</published><updated>2008-01-20T06:49:28.706-08:00</updated><title type='text'>sum of even and odd number in the given range</title><content type='html'>/* programe to find sum of even and odd number in the given range&lt;br /&gt;   created date 30/06/07&lt;br /&gt;   modified date 30/06/07&lt;br /&gt;   created by: sekhar */&lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt; main()&lt;br /&gt;{&lt;br /&gt;  int i=0,num=0,sum=0;&lt;br /&gt;   scanf("%d",num);&lt;br /&gt;  while(i&lt;=num)&lt;br /&gt;  {&lt;br /&gt;   num=num+2;&lt;br /&gt;   sum=sum+num;&lt;br /&gt;   i++;&lt;br /&gt;  }&lt;br /&gt;     printf("%d",sum);  &lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-7486586943225738428?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/7486586943225738428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=7486586943225738428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7486586943225738428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7486586943225738428'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/sum-of-even-and-odd-number-in-given.html' title='sum of even and odd number in the given range'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-1979890854636310187</id><published>2008-01-20T06:47:00.000-08:00</published><updated>2008-01-20T06:48:43.313-08:00</updated><title type='text'>introduction to structures</title><content type='html'>/* prg to use stuctures &lt;br /&gt;   written on 05/07/07&lt;br /&gt;   modified on 05/07/07&lt;br /&gt;   written by sekhar*/&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;  main()&lt;br /&gt;  {&lt;br /&gt;     int i;&lt;br /&gt;     struct book&lt;br /&gt;     {&lt;br /&gt;       char name;&lt;br /&gt;       float price;&lt;br /&gt;       int pages;&lt;br /&gt;     };&lt;br /&gt;     struct book b[3];&lt;br /&gt;&lt;br /&gt;     printf("\nEnter names,prices&amp;no of pages of 3 books\n");&lt;br /&gt;     for(i=0;i&lt;=2;i++)&lt;br /&gt;     scanf("%c %f %d ",&amp;b[i].name,&amp;b[i].price,&amp;b[i].pages);&lt;br /&gt;    // scanf("%c %f %d ",&amp;b2.name,&amp;b2.price,&amp;b2.pages);&lt;br /&gt;    // scanf("%c %f %d ",&amp;b3.name,&amp;b3.price,&amp;b3.pages);&lt;br /&gt;     printf(" This is what you entered");&lt;br /&gt;     for(i=0;i&lt;=2;i++)&lt;br /&gt;      printf("%c %f %d ",b[i].name,b[i].price,b[i].pages);&lt;br /&gt;    // printf("%c %f %d ",b2.name,b2.price,b2.pages);&lt;br /&gt;    // printf("%c %f %d ",b3.name,b3.price,b3.pages);&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-1979890854636310187?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/1979890854636310187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=1979890854636310187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1979890854636310187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1979890854636310187'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/introduction-to-structures.html' title='introduction to structures'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-6699684853725712587</id><published>2008-01-20T06:46:00.000-08:00</published><updated>2008-01-20T06:47:45.789-08:00</updated><title type='text'>string length</title><content type='html'>/* pgr to find string length&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 23/07/07&lt;br /&gt;   modified on 23/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#define size 10 &lt;br /&gt;void strlength(char *); &lt;br /&gt;main()&lt;br /&gt;  {&lt;br /&gt;    char str1[size];&lt;br /&gt;    int i;&lt;br /&gt;     strlength(str1);     //fn call       &lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;void strlength(char * str11)&lt;br /&gt;   {&lt;br /&gt;     int i=0,count=0;&lt;br /&gt;    // for(i=0;i&lt;(size);i++)&lt;br /&gt;        scanf("%s",&amp;str11[i]);&lt;br /&gt;        &lt;br /&gt;     while(str11[i++]!='\0')&lt;br /&gt;       ++count;&lt;br /&gt;        printf("length=%d",count);&lt;br /&gt;   }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-6699684853725712587?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/6699684853725712587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=6699684853725712587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6699684853725712587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6699684853725712587'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/string-length.html' title='string length'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-2916571696570463501</id><published>2008-01-20T06:44:00.000-08:00</published><updated>2008-01-20T06:46:19.492-08:00</updated><title type='text'>string concatnation</title><content type='html'>/* pgr to copy two stings&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 23/07/07&lt;br /&gt;   modified on 23/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#define size 10 &lt;br /&gt;void strconcate(char *,char *,char *); &lt;br /&gt;main()&lt;br /&gt;  {&lt;br /&gt;    char str1[size],str2[size],str3[size];&lt;br /&gt;    int i;&lt;br /&gt;     strconcate(str1,str2,str3);     //fn call&lt;br /&gt;      for(i=0;i&lt;=(size+size);i++)&lt;br /&gt;         printf("%c",str3[i]);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;void strconcate(char * str11,char *str22,char *str33)&lt;br /&gt;   {&lt;br /&gt;     int i;&lt;br /&gt;     for(i=0;i&lt;(size);i++)&lt;br /&gt;       {&lt;br /&gt;        scanf("%c",&amp;str11[i]);&lt;br /&gt;         str33[i]=str11[i];&lt;br /&gt;      //  printf("\n");&lt;br /&gt;       } &lt;br /&gt;      for(i=0;i&lt;(size);i++)&lt;br /&gt;       {&lt;br /&gt;        scanf("%c",&amp;str22[i]);&lt;br /&gt;         str33[size+i]=str22[i];&lt;br /&gt;       }&lt;br /&gt;   }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-2916571696570463501?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/2916571696570463501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=2916571696570463501' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2916571696570463501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2916571696570463501'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/string-concatnation.html' title='string concatnation'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-7527688905157357792</id><published>2008-01-19T18:37:00.002-08:00</published><updated>2008-01-19T18:38:48.043-08:00</updated><title type='text'>copy stings</title><content type='html'>/*pgr to copy stings &lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 25/07/07&lt;br /&gt;  modified on 25/07/07*/&lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt; #define size 10&lt;br /&gt; void sestrcpy(char *, char *); //prototype for copy the stings &lt;br /&gt;  main()&lt;br /&gt;  {&lt;br /&gt;    char str1[size],str2[size],i;&lt;br /&gt;     //scanf("%s",str1);&lt;br /&gt;   gets(str1);&lt;br /&gt;   sestrcpy(str2,str1); //first is destination  second in source passing into th copy functio&lt;br /&gt; // for(i=0;i&lt;=50;i++)  &lt;br /&gt;  // printf("%s",(str2));&lt;br /&gt;      puts(str2);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;//function defnition &lt;br /&gt;void sestrcpy(char *s2,char *s1)  //first is destination second is source  &lt;br /&gt; {&lt;br /&gt;   char i;&lt;br /&gt;   for (i=0;*s1++!='\0';i++)&lt;br /&gt;    {&lt;br /&gt;      *++s2=*s1;&lt;br /&gt;    //printf("%u----%c",s2,*s2);&lt;br /&gt;    }&lt;br /&gt;  *(s2+i)='\0';&lt;br /&gt;&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-7527688905157357792?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/7527688905157357792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=7527688905157357792' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7527688905157357792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7527688905157357792'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/copy-stings.html' title='copy stings'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-3492726964294841904</id><published>2008-01-19T18:37:00.001-08:00</published><updated>2008-01-19T18:37:49.571-08:00</updated><title type='text'>strcpy</title><content type='html'>/*prgrame to know about strcpy&lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 25/07/07&lt;br /&gt;  modified on 25/07/07*/&lt;br /&gt; &lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#include&lt;string.h&gt;&lt;br /&gt;#define size 6&lt;br /&gt; main()&lt;br /&gt; {&lt;br /&gt;   char s1[size],s2[size];&lt;br /&gt;    scanf("%s",s1);&lt;br /&gt;   strcpy(s2,s1);  //s2 is destination &amp; s1 is source&lt;br /&gt;    printf("%s",s2);//for printing the strings we have to point out the fist mem                       ory location &lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-3492726964294841904?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/3492726964294841904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=3492726964294841904' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3492726964294841904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3492726964294841904'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/strcpy.html' title='strcpy'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-1635615970487455474</id><published>2008-01-19T18:36:00.000-08:00</published><updated>2008-01-19T18:37:13.206-08:00</updated><title type='text'>string compare</title><content type='html'>/* program to know about string compare&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 25/07/07&lt;br /&gt;   modified on 25/07/07 */&lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt; #include&lt;string.h&gt;&lt;br /&gt; #define size 7&lt;br /&gt;&lt;br /&gt;  main()&lt;br /&gt;  {&lt;br /&gt;   char s1[size],s2[size],s3[size+size];&lt;br /&gt;   int x;&lt;br /&gt;     scanf("%s",s1);&lt;br /&gt;     scanf("%s",s2);&lt;br /&gt;   x=strcmp(s1,s2);&lt;br /&gt;     printf("%d",x);&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-1635615970487455474?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/1635615970487455474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=1635615970487455474' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1635615970487455474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1635615970487455474'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/string-compare.html' title='string compare'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-1379075934681669959</id><published>2008-01-19T18:35:00.000-08:00</published><updated>2008-01-19T18:36:13.920-08:00</updated><title type='text'>strconcatnation</title><content type='html'>/*pgr to know about strconcatnation&lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 25/07/07&lt;br /&gt;  modified on 25/07/07*/&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;#define size 8&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;    char s1[size],s2[size];&lt;br /&gt;    int i;&lt;br /&gt;      scanf("%s%s",s1,s2);&lt;br /&gt;    strcat(s1,s2);&lt;br /&gt;     for(i=0;i&lt;=20;i++)&lt;br /&gt;      printf("\ns1%u---%c   s2%u-----%c",&amp;s1[i],s1[i],&amp;s2[i],s2[i]);&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-1379075934681669959?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/1379075934681669959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=1379075934681669959' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1379075934681669959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1379075934681669959'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/strconcatnation.html' title='strconcatnation'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-1497900172027886993</id><published>2008-01-19T18:34:00.000-08:00</published><updated>2008-01-19T18:35:24.773-08:00</updated><title type='text'>fibnocci series  using recursion</title><content type='html'>/* pgr to write fibnocci series  using recursion&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 12/07/07&lt;br /&gt;   modified on 12/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;int fib(int);&lt;br /&gt;main()&lt;br /&gt;  {&lt;br /&gt;      int num, i;&lt;br /&gt;      printf("how long you want the series enter number:");&lt;br /&gt;      scanf("%d",&amp;num);&lt;br /&gt;&lt;br /&gt;     for(i=0; i&lt;(num); i++)&lt;br /&gt;        printf("%d ", fib(i));&lt;br /&gt;    &lt;br /&gt;  }&lt;br /&gt; int fib(int a)&lt;br /&gt;   {&lt;br /&gt;       int x;&lt;br /&gt;     if(a==0)&lt;br /&gt;      return(0);&lt;br /&gt;     if(a==1)&lt;br /&gt;      return(1);&lt;br /&gt;   x = fib(a-1)+fib(a-2);&lt;br /&gt;      return(x);&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-1497900172027886993?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/1497900172027886993/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=1497900172027886993' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1497900172027886993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1497900172027886993'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/fibnocci-series-using-recursion.html' title='fibnocci series  using recursion'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-7560486994825350009</id><published>2008-01-19T18:33:00.000-08:00</published><updated>2008-01-19T18:34:29.732-08:00</updated><title type='text'>find factorial by using recursion</title><content type='html'>/*prg to find factorial by using recursion&lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 12/07/07&lt;br /&gt;  modified on 12/07/07*/&lt;br /&gt;//program starts&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;int factorial(int);&lt;br /&gt;main()&lt;br /&gt;  {&lt;br /&gt;    int num,res;&lt;br /&gt;      printf("enter the number to find factorial:");&lt;br /&gt;      scanf("%d",&amp;num);&lt;br /&gt;    res=factorial(num);&lt;br /&gt;      printf("%d",res);&lt;br /&gt;  }&lt;br /&gt; int factorial(int fact)&lt;br /&gt;   {&lt;br /&gt;   if(fact==1)&lt;br /&gt;     return(1);&lt;br /&gt;  fact=fact*factorial(fact-1);&lt;br /&gt;     printf("\n%d",fact);&lt;br /&gt;     return(fact);&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-7560486994825350009?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/7560486994825350009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=7560486994825350009' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7560486994825350009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7560486994825350009'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/find-factorial-by-using-recursion.html' title='find factorial by using recursion'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-5507563323256561152</id><published>2008-01-19T18:31:00.002-08:00</published><updated>2008-01-19T18:33:07.968-08:00</updated><title type='text'>string operations in infinite loop</title><content type='html'>/* pgr to find string operations in infinite loop&lt;br /&gt;   written by sekhar&lt;br /&gt; written on 30/07/07*/&lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt;  void string_copy(char *,char *);&lt;br /&gt;  void string_concat(char *,char *);&lt;br /&gt;  void string_word_count(char *,int *);&lt;br /&gt;  int string_length(char *);&lt;br /&gt;  int string_cmp(char *,char *);  &lt;br /&gt;  main()&lt;br /&gt;   {&lt;br /&gt;    int option,count=0,x,y;&lt;br /&gt;    char str1[40],str2[40],strs1[40],strs2[40];&lt;br /&gt;  puts("enter the string:");&lt;br /&gt;  gets(str1); &lt;br /&gt;     while(1)&lt;br /&gt;    {&lt;br /&gt;     printf("1:for string copy, 2;string concatenate3:count string word count,4:strig length");&lt;br /&gt;     scanf("%d",&amp;option);&lt;br /&gt;     switch(option)&lt;br /&gt;     {&lt;br /&gt;      case 1:&lt;br /&gt;             string_copy(str1,str2);&lt;br /&gt;             puts(str2);&lt;br /&gt;             break;&lt;br /&gt;      case 2:&lt;br /&gt;             string_concat(str1,str2);&lt;br /&gt;             puts(str1);&lt;br /&gt;             break;&lt;br /&gt;      case 3:&lt;br /&gt;             string_word_count(str1,&amp;count);&lt;br /&gt;               printf("%d",count);&lt;br /&gt;             break;&lt;br /&gt;      case 4:&lt;br /&gt;            x=string_length(str1);&lt;br /&gt;               printf("%d",x);&lt;br /&gt;             break;&lt;br /&gt;      case 5:&lt;br /&gt;             puts("enter first string for compare:");&lt;br /&gt;             gets(strs1);&lt;br /&gt;             puts("enter second string for compare:");&lt;br /&gt;             gets(strs2);&lt;br /&gt;            y=string_cmp(strs1,strs2);&lt;br /&gt;             printf("%d",y);&lt;br /&gt;             break;&lt;br /&gt;     /* case 6:&lt;br /&gt;            string_char_str();&lt;br /&gt;            break;*/ &lt;br /&gt;      case 7:&lt;br /&gt;            exit();       &lt;br /&gt;     }&lt;br /&gt;   }&lt;br /&gt;}  &lt;br /&gt; void  string_copy(char *s1,char *s2)&lt;br /&gt;&lt;br /&gt;   { &lt;br /&gt;    while(*s1!='\0')&lt;br /&gt;     *s2++=*s1++;&lt;br /&gt;    *s2='\0';&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt; void  string_concat(char *s1,char *s2)&lt;br /&gt;   {&lt;br /&gt;    while(*++s1!='\0')&lt;br /&gt;      *s1=*s1;&lt;br /&gt;     puts(s2);&lt;br /&gt;    while(*s2!='\0')&lt;br /&gt;    {&lt;br /&gt;      puts(s2);&lt;br /&gt;      *s1++=*s2++;&lt;br /&gt;    }&lt;br /&gt;    *s1='\0';&lt;br /&gt;  }&lt;br /&gt;//function for word length&lt;br /&gt; void string_word_count(char *s1, int *cou)&lt;br /&gt;  {&lt;br /&gt;   while(*s1++!='\0')&lt;br /&gt;   {&lt;br /&gt;    if(*s1==32||*s1=='\0') // 32 in ascii equelent of ' '&lt;br /&gt;    {&lt;br /&gt;     *cou=*cou+1;&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; //function for calculate string length   &lt;br /&gt; int string_length(char *s1)&lt;br /&gt; {&lt;br /&gt;  int cou=0;&lt;br /&gt;  while(*s1++!='\0')&lt;br /&gt;  {&lt;br /&gt;    cou++;&lt;br /&gt;  }&lt;br /&gt;   return cou;&lt;br /&gt;}&lt;br /&gt;//function for compare two strings&lt;br /&gt;int string_cmp(char *s1,char *s2)&lt;br /&gt;{&lt;br /&gt; int co=0;&lt;br /&gt; while(*s1++!='\0'&amp;&amp;*s2++!='\0')&lt;br /&gt;  {   &lt;br /&gt;   co=*s1-*s2;&lt;br /&gt;  }&lt;br /&gt; return co;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-5507563323256561152?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/5507563323256561152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=5507563323256561152' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5507563323256561152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5507563323256561152'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/string-operations-in-infinite-loop.html' title='string operations in infinite loop'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-5075832477134834331</id><published>2008-01-19T18:31:00.001-08:00</published><updated>2008-01-19T18:31:54.342-08:00</updated><title type='text'>find areas using menu bar</title><content type='html'>/* pgr to find areas using menu bar&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 13/07/07&lt;br /&gt;   modified on 13/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; void triangle(int,int,float *,float *);&lt;br /&gt; void rectangle(int,int,float *,float*);&lt;br /&gt; void circle(int,float *,float *);&lt;br /&gt; void square(int,float *,float *); &lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;    int base,height,length,breath,radius,side,i;&lt;br /&gt;    float area,perimeter;&lt;br /&gt;      while(1)&lt;br /&gt;      {&lt;br /&gt;        printf("select from menu:\n1 for triangle \n 2 for rectangle\n 3 for circle\n 4 for sqare\n 5 for exit\n");&lt;br /&gt;        scanf("%d",&amp;i);&lt;br /&gt;       switch(i)&lt;br /&gt;         {&lt;br /&gt;          case 1:&lt;br /&gt;                   printf("enter the base&amp;height for a triangle");&lt;br /&gt;                   scanf("%d%d",&amp;base,&amp;height);&lt;br /&gt;                triangle(base,height,&amp;area,&amp;perimeter);&lt;br /&gt;                   printf("\narea is %f\nperimeter is %f\n",area,perimeter);&lt;br /&gt;                break;&lt;br /&gt;&lt;br /&gt;          case 2:&lt;br /&gt;                   printf("enter the length &amp;breath for a rectangle");&lt;br /&gt;                   scanf("%d%d",&amp;length,&amp;breath);&lt;br /&gt;                rectangle(length,breath,&amp;area,&amp;perimeter);&lt;br /&gt;                    printf("\narea is %f\nperimeter is %f\n",area,perimeter);&lt;br /&gt;                 break; &lt;br /&gt;  &lt;br /&gt;          case 3:&lt;br /&gt;                   printf("enter the radiud of a circle");&lt;br /&gt;                   scanf("%d",&amp;radius);&lt;br /&gt;                circle(radius,&amp;area,&amp;perimeter);&lt;br /&gt;                    printf("\narea is %f\nperimeter is %f\n",area,perimeter);&lt;br /&gt;                 break; &lt;br /&gt;           &lt;br /&gt;          case 4:&lt;br /&gt;                   printf("enter the side of a square");&lt;br /&gt;                   scanf("%d",&amp;side);&lt;br /&gt;                square(side,&amp;area,&amp;perimeter);&lt;br /&gt;                    printf("\narea is %f\nperimeter is %f\n",area,perimeter);&lt;br /&gt;                 break;&lt;br /&gt;          case 5:&lt;br /&gt;                  exit();&lt;br /&gt;         }&lt;br /&gt;       }&lt;br /&gt;  }&lt;br /&gt;  void triangle(int b,int h,float *a,float *p)&lt;br /&gt;   {&lt;br /&gt;     *a=(0.5)*b*h;&lt;br /&gt;     *p=3*b;&lt;br /&gt;   } &lt;br /&gt;  void rectangle(int l,int b,float *a,float *p)&lt;br /&gt;   {&lt;br /&gt;     *a=l*b;&lt;br /&gt;     *p=2*(l+b);&lt;br /&gt;   } &lt;br /&gt;  void circle(int r,float *a,float *p)&lt;br /&gt;   {&lt;br /&gt;     *a=(3.141)*r*r;&lt;br /&gt;     *p=2*3.141*r;&lt;br /&gt;   } &lt;br /&gt;  void square(int s,float *a,float *p)&lt;br /&gt;   {&lt;br /&gt;     *a=s*s;&lt;br /&gt;     *p=4*s;&lt;br /&gt;   }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-5075832477134834331?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/5075832477134834331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=5075832477134834331' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5075832477134834331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5075832477134834331'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/find-areas-using-menu-bar.html' title='find areas using menu bar'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-7582123649395125936</id><published>2008-01-19T18:30:00.000-08:00</published><updated>2008-01-19T18:31:12.343-08:00</updated><title type='text'>indentity matrix without arrays with functins</title><content type='html'>/* program to write indentity matrix without arrays with functins&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 10/07/07&lt;br /&gt;   modified on 10/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; void idisplay();&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;    idisplay();&lt;br /&gt;  }&lt;br /&gt;  void idisplay()&lt;br /&gt;   {&lt;br /&gt;    int i,j;&lt;br /&gt;     for(i=1;i&lt;=3;i++)&lt;br /&gt;      {&lt;br /&gt;        for(j=1;j&lt;=3;j++)&lt;br /&gt;         {&lt;br /&gt;           if(i==j)&lt;br /&gt;             printf("\t1");&lt;br /&gt;           else&lt;br /&gt;             printf("\t%d",i+j);&lt;br /&gt;         }  &lt;br /&gt;         printf("\n");&lt;br /&gt;      }&lt;br /&gt;   }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-7582123649395125936?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/7582123649395125936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=7582123649395125936' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7582123649395125936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7582123649395125936'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/indentity-matrix-without-arrays-with.html' title='indentity matrix without arrays with functins'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-4490746424386723035</id><published>2008-01-19T18:29:00.000-08:00</published><updated>2008-01-19T18:30:33.858-08:00</updated><title type='text'>write indentity matrix without arrays with functins</title><content type='html'>/* program to write indentity matrix without arrays with functins&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 10/07/07&lt;br /&gt;   modified on 10/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; void idisplay();&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;    idisplay();&lt;br /&gt;  }&lt;br /&gt;  void idisplay()&lt;br /&gt;   {&lt;br /&gt;    int i,j;&lt;br /&gt;     for(i=1;i&lt;=3;i++)&lt;br /&gt;      {&lt;br /&gt;        for(j=1;j&lt;=3;j++)&lt;br /&gt;         {&lt;br /&gt;           if(i==j)&lt;br /&gt;             printf("\t1");&lt;br /&gt;           else&lt;br /&gt;             printf("\t0");&lt;br /&gt;         }  &lt;br /&gt;         printf("\n");&lt;br /&gt;      }&lt;br /&gt;   }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-4490746424386723035?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/4490746424386723035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=4490746424386723035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4490746424386723035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4490746424386723035'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/write-indentity-matrix-without-arrays.html' title='write indentity matrix without arrays with functins'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-7952040971280021232</id><published>2008-01-19T18:28:00.002-08:00</published><updated>2008-01-19T18:29:38.065-08:00</updated><title type='text'>matrix display with function without arrays</title><content type='html'>/*program for matrix display with function without arrays&lt;br /&gt;  written by sekhar &lt;br /&gt;  written on 10/07/2007&lt;br /&gt;  modified on 10/07/07 */&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; void display();&lt;br /&gt; main()&lt;br /&gt;   { &lt;br /&gt;    display();&lt;br /&gt;   }&lt;br /&gt; void display()&lt;br /&gt;   {&lt;br /&gt;     int i;&lt;br /&gt;     for(i=1;i&lt;=9;++i)&lt;br /&gt;       {&lt;br /&gt;         printf("\t%d",i);&lt;br /&gt;         if(i%3==0)&lt;br /&gt;           printf("\n");&lt;br /&gt;       }&lt;br /&gt;    }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-7952040971280021232?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/7952040971280021232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=7952040971280021232' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7952040971280021232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7952040971280021232'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/matrix-display-with-function-without.html' title='matrix display with function without arrays'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-3909215430659309952</id><published>2008-01-19T18:28:00.001-08:00</published><updated>2008-01-19T18:28:49.282-08:00</updated><title type='text'>to store data in memory locations</title><content type='html'>/*pgr to know about how to store data in memory locations&lt;br /&gt;  written by sekhar written on 28/07/07&lt;br /&gt;  modified on 18/07/07*/&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;  main()&lt;br /&gt;  {&lt;br /&gt; int i,a;   &lt;br /&gt;  char *x,*b;&lt;br /&gt;  x = (char *) &amp;i;&lt;br /&gt;  b = (char *) &amp;a;&lt;br /&gt;  scanf("%x",&amp;i);&lt;br /&gt;   for(a=0;a&lt;=3;a++)&lt;br /&gt;    {&lt;br /&gt;      &lt;br /&gt;   // printf("%u  %x\n",&amp;i,i); &lt;br /&gt;    printf("%u  %x\n",x+a,*(x+a));&lt;br /&gt;    //printf("%u  %x\n",(b++),*b++);&lt;br /&gt;     }&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-3909215430659309952?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/3909215430659309952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=3909215430659309952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3909215430659309952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3909215430659309952'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/to-store-data-in-memory-locations.html' title='to store data in memory locations'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-7009886634397782073</id><published>2008-01-19T18:27:00.000-08:00</published><updated>2008-01-19T18:28:01.622-08:00</updated><title type='text'>finding the leaf year</title><content type='html'>/*finding the leaf year&lt;br /&gt;  creating date 30/06/07&lt;br /&gt;  modifying date 30/06/07&lt;br /&gt;  created by: sekhar*/&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt; int  year;&lt;br /&gt;   printf("Enter the year:");&lt;br /&gt;   scanf("%d",&amp;year);&lt;br /&gt;  if(year%4==0)&lt;br /&gt;   printf("%d  is a leaf year",year);&lt;br /&gt;  else&lt;br /&gt;   printf("%d  is not a leaf year",year);&lt;br /&gt; } // end of the programe&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-7009886634397782073?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/7009886634397782073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=7009886634397782073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7009886634397782073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7009886634397782073'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/finding-leaf-year.html' title='finding the leaf year'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-7789712552508243063</id><published>2008-01-19T18:26:00.000-08:00</published><updated>2008-01-19T18:27:30.752-08:00</updated><title type='text'>program to scan the numbers from keyboard and print corresponding number in     the  words in screen</title><content type='html'>/* program to scan the numbers from keyboard and print corresponding number in     the  words in screen&lt;br /&gt;   written on 06/07/07&lt;br /&gt;   modified on 17/07/07&lt;br /&gt;   written by sekhar*/&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;&lt;br /&gt;int pow (int , int);&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;    int j,i,k,m,x,q;&lt;br /&gt;    int z,p,n=10;&lt;br /&gt;    char words[10][5]={"zero","one","two","three","four","five","six","seven","eight","nine"};&lt;br /&gt;       printf("enter the number to print in the words");&lt;br /&gt;     scanf("%d",&amp;i);&lt;br /&gt;      q=i;&lt;br /&gt;      p=printf("%d\n",i);&lt;br /&gt;      z=pow(n,p);&lt;br /&gt;       // printf("%d\n",z);&lt;br /&gt;       while(p&gt;1)&lt;br /&gt;       { &lt;br /&gt;         z=z/10;&lt;br /&gt;         k=q/z;&lt;br /&gt;         q=q%z;&lt;br /&gt;         if(z==1)&lt;br /&gt;          {&lt;br /&gt;            m=i%10;&lt;br /&gt;          for(j=0;j&lt;=4;j++)&lt;br /&gt;            printf("%c",words[m][j]);&lt;br /&gt;            exit();&lt;br /&gt;          }&lt;br /&gt;               &lt;br /&gt;        for(j=0;j&lt;=4;j++)&lt;br /&gt;           printf("%c",words[k][j]);&lt;br /&gt;        --p; &lt;br /&gt;       } &lt;br /&gt;   }&lt;br /&gt; int pow(int a,int b)&lt;br /&gt; {&lt;br /&gt;  int j,y=1;&lt;br /&gt;   for(j=1;j&lt;(b);j++)&lt;br /&gt;     y=y*a;&lt;br /&gt;   return(y);&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-7789712552508243063?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/7789712552508243063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=7789712552508243063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7789712552508243063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/7789712552508243063'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/program-to-scan-numbers-from-keyboard.html' title='program to scan the numbers from keyboard and print corresponding number in     the  words in screen'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-986096161483405634</id><published>2008-01-19T18:25:00.000-08:00</published><updated>2008-01-19T18:26:07.028-08:00</updated><title type='text'>know the incements pre&amp;post</title><content type='html'>/* pgr to know the incements pre&amp;post&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 13/07/07&lt;br /&gt;   modified on 13/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;   int i=10;&lt;br /&gt;   ++i;&lt;br /&gt;     printf("%d%d",++i,i++);&lt;br /&gt;   i++;&lt;br /&gt;     printf("%d",i);&lt;br /&gt;   }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-986096161483405634?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/986096161483405634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=986096161483405634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/986096161483405634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/986096161483405634'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/know-incements-pre.html' title='know the incements pre&amp;post'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-4396565697649363356</id><published>2008-01-19T18:24:00.000-08:00</published><updated>2008-01-19T18:25:29.614-08:00</updated><title type='text'>find highest and lowest integer among 3 numbers</title><content type='html'>/* programe for find highest and lowest integer among 3 numbers&lt;br /&gt;   written date :02/07/07&lt;br /&gt;   modified date : 02/07/07&lt;br /&gt;   written by sekhar*/&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;void highest(int,int,int);         // function definition for the highest number&lt;br /&gt;void lowest(int,int,int);          // function definition for the lowest number&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;  int a,b,c;&lt;br /&gt;    printf(" Enter the 3 numbers");&lt;br /&gt;    scanf("%d%d%d",&amp;a,&amp;b,&amp;c);&lt;br /&gt;  highest(a,b,c);             //function calling for the find highest number&lt;br /&gt;  lowest(a,b,c);              //function calling for the find lowest number &lt;br /&gt;}&lt;br /&gt;// function definition for find highest numer among 3 numbers &lt;br /&gt;// written on 02/07/07&lt;br /&gt;//written by sekhar&lt;br /&gt;void highest(int x,int y,int z)&lt;br /&gt;{&lt;br /&gt;  if(x&gt;y)&lt;br /&gt;    {&lt;br /&gt;       if(x&gt;z)&lt;br /&gt;         printf("\n %d is a highest number",x);&lt;br /&gt;       else&lt;br /&gt;         printf("\n %d is a highest number",z);&lt;br /&gt;    }                        //if block ends &lt;br /&gt;  else&lt;br /&gt;    {  &lt;br /&gt;       if(y&gt;z)&lt;br /&gt;         printf("\n %d is a highest number",y);&lt;br /&gt;       else&lt;br /&gt;         printf("\n %d is a highest number",z);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;// function definition for find lowest numer among 3 numbers &lt;br /&gt;// written on 02/07/07&lt;br /&gt;//written by sekhar&lt;br /&gt;&lt;br /&gt;void lowest(int x,int y,int z)&lt;br /&gt;{&lt;br /&gt;  if(x&lt;(y))&lt;br /&gt;    {&lt;br /&gt;       if(x&lt;(z))&lt;br /&gt;         printf("%d is a lowest number",x);&lt;br /&gt;       else&lt;br /&gt;         printf("%d is a lowest number",z);&lt;br /&gt;    }                        //if block ends &lt;br /&gt;  else&lt;br /&gt;    {  &lt;br /&gt;       if(y&lt;(z))&lt;br /&gt;         printf("%d is a lowest number",y);&lt;br /&gt;       else&lt;br /&gt;         printf("%d is a lowest number",z);&lt;br /&gt;    }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-4396565697649363356?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/4396565697649363356/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=4396565697649363356' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4396565697649363356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4396565697649363356'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/find-highest-and-lowest-integer-among-3.html' title='find highest and lowest integer among 3 numbers'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-4349803366543774253</id><published>2008-01-19T18:23:00.000-08:00</published><updated>2008-01-19T18:24:00.408-08:00</updated><title type='text'>display the the letters in the arranged formate</title><content type='html'>/* prg to display the the letters in the arranged formate&lt;br /&gt;   wriiten by sekhar&lt;br /&gt;   written on 10/07/07&lt;br /&gt;   modified on 10/07/07 */&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; main()&lt;br /&gt; {&lt;br /&gt;  int i,j,n;&lt;br /&gt;    printf("enter the number:");&lt;br /&gt;    scanf("%d",&amp;n);&lt;br /&gt;   for(i=n;i&lt;=90;i++)&lt;br /&gt;    {&lt;br /&gt;      for(j=n;j&lt;=i;j++)&lt;br /&gt;        printf(" %c",j);&lt;br /&gt;        printf("\n");&lt;br /&gt;    }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-4349803366543774253?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/4349803366543774253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=4349803366543774253' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4349803366543774253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4349803366543774253'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/display-the-letters-in-arranged-formate.html' title='display the the letters in the arranged formate'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-4874513749857130843</id><published>2008-01-19T18:22:00.002-08:00</published><updated>2008-01-19T18:23:17.511-08:00</updated><title type='text'>sizeof operator</title><content type='html'>main()&lt;br /&gt;{&lt;br /&gt;  float x=5.5;&lt;br /&gt;  printf("%f%d",x,sizeof(5.5));&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-4874513749857130843?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/4874513749857130843/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=4874513749857130843' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4874513749857130843'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4874513749857130843'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/sizeof-operator.html' title='sizeof operator'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-2982388122093090923</id><published>2008-01-19T18:22:00.001-08:00</published><updated>2008-01-19T18:22:28.067-08:00</updated><title type='text'>fibanocci series</title><content type='html'>/*pgr to find fibanocci series&lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 14/07/07 */&lt;br /&gt; &lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt;  void fib(void);&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;   fib();&lt;br /&gt;  }&lt;br /&gt; void fib()&lt;br /&gt; {&lt;br /&gt;   int x=0,y=1;&lt;br /&gt;   int i,n,res;&lt;br /&gt;    scanf("%d",&amp;n);&lt;br /&gt;    printf("%d\n",x);&lt;br /&gt;   for(i=0;i&lt;=n;i++)&lt;br /&gt;    {&lt;br /&gt;     res=x+y;&lt;br /&gt;     x=y;&lt;br /&gt;     y=res;&lt;br /&gt;      printf("%d\n",x);&lt;br /&gt;    }&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-2982388122093090923?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/2982388122093090923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=2982388122093090923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2982388122093090923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2982388122093090923'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/fibanocci-series.html' title='fibanocci series'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-4019147450012224864</id><published>2008-01-19T18:21:00.001-08:00</published><updated>2008-01-19T18:21:59.644-08:00</updated><title type='text'>find factorial series</title><content type='html'>/*pgr to find factorial series&lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 14/07/07 */&lt;br /&gt; &lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt;  void fact(void);&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;   fact();&lt;br /&gt;  }&lt;br /&gt; void fact()&lt;br /&gt; {&lt;br /&gt;   int i,n,res=1;&lt;br /&gt;    scanf("%d",&amp;n);&lt;br /&gt;    &lt;br /&gt;   for(i=1;i&lt;=n;i++)&lt;br /&gt;     res=res*i;&lt;br /&gt;     printf("%d",res);&lt;br /&gt;    &lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-4019147450012224864?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/4019147450012224864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=4019147450012224864' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4019147450012224864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4019147450012224864'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/find-factorial-series.html' title='find factorial series'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-8224905837600246183</id><published>2008-01-19T18:20:00.000-08:00</published><updated>2008-01-19T18:21:29.316-08:00</updated><title type='text'>find even sum</title><content type='html'>/* programe to find even sum&lt;br /&gt;   written date 02/07/07&lt;br /&gt;   modified date 02/07/07&lt;br /&gt;   written by sekhar*/&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;&lt;br /&gt; int i=0,num,sum=0;&lt;br /&gt;  main()&lt;br /&gt;  {&lt;br /&gt;     scanf("%d",&amp;num);&lt;br /&gt;   while(i&lt;=num)&lt;br /&gt;     {&lt;br /&gt;       sum=sum+(i+2);&lt;br /&gt;       i++;&lt;br /&gt;     }    &lt;br /&gt;     printf("%d",sum);&lt;br /&gt;     printf("%u   %u  %u",&amp;i,&amp;num,&amp;sum);&lt;br /&gt;     printf("%u",main);&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-8224905837600246183?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/8224905837600246183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=8224905837600246183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/8224905837600246183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/8224905837600246183'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/find-even-sum.html' title='find even sum'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-9195357008804423622</id><published>2008-01-19T18:19:00.000-08:00</published><updated>2008-01-19T18:20:46.604-08:00</updated><title type='text'>find even,odd, prime and perfect number</title><content type='html'>/*programe for find even,odd, prime and perfect number&lt;br /&gt;  date of programe    30\06\07&lt;br /&gt;  modified date       30\06\07&lt;br /&gt;  programe written by: sekhar */ &lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{ &lt;br /&gt; int a,b=2,c=0;&lt;br /&gt; printf("Enter a:");&lt;br /&gt;   scanf("%d",&amp;a);&lt;br /&gt;   if(a%2==0)&lt;br /&gt;     printf(" the given number is even number");&lt;br /&gt;   else&lt;br /&gt;    printf(" the given number is odd number");&lt;br /&gt;  &lt;br /&gt;  while(b&lt;(a))&lt;br /&gt;  {&lt;br /&gt;   if(a%b==0)&lt;br /&gt;   {&lt;br /&gt;     printf("\n%d", b);&lt;br /&gt;     c=c++;&lt;br /&gt;   }   // if loop ends &lt;br /&gt;   b=b++; &lt;br /&gt;  }&lt;br /&gt;//int a,b=2,c=0;&lt;br /&gt;   // while loop ends&lt;br /&gt; if (c==0)&lt;br /&gt;  printf("\n%d is prime number", a);&lt;br /&gt; else&lt;br /&gt;  printf("\n%d is not a prime number", a);&lt;br /&gt;}    // program ends&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-9195357008804423622?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/9195357008804423622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=9195357008804423622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/9195357008804423622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/9195357008804423622'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/find-evenodd-prime-and-perfect-number.html' title='find even,odd, prime and perfect number'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-6815083327602006197</id><published>2008-01-19T18:18:00.000-08:00</published><updated>2008-01-19T18:19:25.663-08:00</updated><title type='text'>display charecters in the specified formate</title><content type='html'>/* prg to display charecters in the specified formate&lt;br /&gt;   writtn by sekhar&lt;br /&gt;   written on 10/07/07&lt;br /&gt;   modified on 10/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; main()&lt;br /&gt;{&lt;br /&gt;  int n,i,j;&lt;br /&gt;  printf("enter the number");&lt;br /&gt;  scanf("%d",&amp;n);&lt;br /&gt;    for(i=n;i&gt;=65;i--)&lt;br /&gt;     {&lt;br /&gt;      for(j=i;j&gt;=65;j--)&lt;br /&gt;       printf("\2%c",j);&lt;br /&gt;       printf("\n");&lt;br /&gt;     }&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-6815083327602006197?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/6815083327602006197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=6815083327602006197' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6815083327602006197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6815083327602006197'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/display-charecters-in-specified-formate.html' title='display charecters in the specified formate'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-4804203282945542637</id><published>2008-01-19T18:17:00.000-08:00</published><updated>2008-01-19T18:18:29.974-08:00</updated><title type='text'>Maniplation of arrays</title><content type='html'>/* prg to use arrays in descending order&lt;br /&gt;   writtenby sekhar&lt;br /&gt;   written on 09/07/07&lt;br /&gt;   modified on 09/07/07*/  &lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;   int a[5],i,t,x,y;&lt;br /&gt;    for(i=0;i&lt;=4;i++)&lt;br /&gt;      scanf("%d",&amp;a[i]);&lt;br /&gt;    for(y=0;y&lt;=4;y++)&lt;br /&gt;     {&lt;br /&gt;      i=0;&lt;br /&gt;    for(x=0;x&lt;=4;x++)&lt;br /&gt;     {&lt;br /&gt;       &lt;br /&gt;       if(a[i]&lt;=a[++i])&lt;br /&gt;         {&lt;br /&gt;             //printf("\n%d",a[i]); &lt;br /&gt;           t=a[--i];&lt;br /&gt;           a[i]=a[++i];&lt;br /&gt;           a[i]=t;&lt;br /&gt;            // printf("\n%d",a[--i]);&lt;br /&gt;         }                               // if block ends&lt;br /&gt;     &lt;br /&gt;     }                       //x for loop ends&lt;br /&gt;     }                       //y for loop ends&lt;br /&gt;   for(i=0;i&lt;=4;i++)&lt;br /&gt;      printf("\n%d",a[i]);&lt;br /&gt;&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-4804203282945542637?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/4804203282945542637/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=4804203282945542637' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4804203282945542637'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4804203282945542637'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/maniplation-of-arrays.html' title='Maniplation of arrays'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-1455749402438971750</id><published>2008-01-19T18:16:00.002-08:00</published><updated>2008-01-19T18:17:29.025-08:00</updated><title type='text'>decision control 4</title><content type='html'>/* prg4 to use decision control&lt;br /&gt;written on 05/07/07&lt;br /&gt;modified on 05/07/07&lt;br /&gt;written by sekhar */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; main()&lt;br /&gt;{&lt;br /&gt;   int x=10,y=20;&lt;br /&gt;      x==20&amp;&amp;y!=10?printf("true"):printf("false");&lt;br /&gt;      &lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-1455749402438971750?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/1455749402438971750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=1455749402438971750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1455749402438971750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1455749402438971750'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/decision-control-4.html' title='decision control 4'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-3749416255108724132</id><published>2008-01-19T18:16:00.001-08:00</published><updated>2008-01-19T18:16:49.575-08:00</updated><title type='text'>decision control 3</title><content type='html'>/* prg3 to use decision control&lt;br /&gt;written on 05/07/07&lt;br /&gt;modified on 05/07/07&lt;br /&gt;written by sekhar */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; main()&lt;br /&gt;{&lt;br /&gt;   int ji=65;&lt;br /&gt;      printf("\n ji&gt;=65 ? %d : %c",ji);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-3749416255108724132?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/3749416255108724132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=3749416255108724132' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3749416255108724132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/3749416255108724132'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/decision-control-3.html' title='decision control 3'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-6249721769058463916</id><published>2008-01-19T18:15:00.002-08:00</published><updated>2008-01-19T18:16:05.774-08:00</updated><title type='text'>decision controle 2</title><content type='html'>/*  pgr to use decision contole &lt;br /&gt;written on 05/07/07&lt;br /&gt;modified on 05/07/07&lt;br /&gt;written by sekhar */&lt;br /&gt;&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;  main()&lt;br /&gt;  {&lt;br /&gt;    int k, num=30;&lt;br /&gt;    k=(num&gt;5 ? (num&lt;=10?100:200):500);&lt;br /&gt;      printf("\n%d  %d",num,k);&lt;br /&gt;   }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-6249721769058463916?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/6249721769058463916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=6249721769058463916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6249721769058463916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6249721769058463916'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/decision-controle-2.html' title='decision controle 2'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-1048049948460767688</id><published>2008-01-19T18:15:00.001-08:00</published><updated>2008-01-19T18:15:27.943-08:00</updated><title type='text'>decision control</title><content type='html'>/* prg to for decision control&lt;br /&gt;   written on 05/07/07&lt;br /&gt;   modified date 05/07/07&lt;br /&gt;   written by sekhar   */&lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;  int i=-4,j,num;&lt;br /&gt;  j=(num&lt;0 ? 0: num*num);&lt;br /&gt;    &lt;br /&gt;    printf("\n%d\n%d",j,num);&lt;br /&gt; &lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-1048049948460767688?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/1048049948460767688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=1048049948460767688' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1048049948460767688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1048049948460767688'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/decision-control.html' title='decision control'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-8697715310774617863</id><published>2008-01-19T18:13:00.001-08:00</published><updated>2008-01-19T18:13:56.721-08:00</updated><title type='text'>prg to convert decimal number in to given base</title><content type='html'>/* prg to convert decimal number in to given base&lt;br /&gt;   written by sekhar &lt;br /&gt;   written on 16/07/07&lt;br /&gt;   modified on 16/07/07&lt;br /&gt;*/&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; main()&lt;br /&gt;  {  &lt;br /&gt;   char arr[]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'};&lt;br /&gt;   int index,number,base,pointing[32];&lt;br /&gt;    while(1)&lt;br /&gt;    {&lt;br /&gt;      int i=0; &lt;br /&gt;       printf("\nenter the number \nif u want to exit press 0");&lt;br /&gt;       scanf("%d",&amp;number);&lt;br /&gt;      if(number==0)&lt;br /&gt;      exit();&lt;br /&gt;        printf("\nenter the base");&lt;br /&gt;        scanf("%d",&amp;base);&lt;br /&gt;     while(number&gt;0)&lt;br /&gt;      {&lt;br /&gt;       pointing[i]=number%base;&lt;br /&gt;       number=number/base;&lt;br /&gt;       ++i;&lt;br /&gt;      }&lt;br /&gt;        printf("converted value is");&lt;br /&gt;     for(--i;i&gt;=0;--i)&lt;br /&gt;     {&lt;br /&gt;      index=pointing[i];&lt;br /&gt;        printf("%c",arr[index]);&lt;br /&gt;     }&lt;br /&gt;   }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-8697715310774617863?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/8697715310774617863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=8697715310774617863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/8697715310774617863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/8697715310774617863'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/prg-to-convert-decimal-number-in-to.html' title='prg to convert decimal number in to given base'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-378443862090357821</id><published>2008-01-19T18:12:00.000-08:00</published><updated>2008-01-19T18:13:10.987-08:00</updated><title type='text'>Know about PUT and GET char</title><content type='html'>#include&lt;stdio.h&gt;&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;    unsigned char ch[4];&lt;br /&gt;    gets(ch);&lt;br /&gt;    puts(ch);&lt;br /&gt;    printf("%u",ch);&lt;br /&gt;   }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-378443862090357821?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/378443862090357821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=378443862090357821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/378443862090357821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/378443862090357821'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/know-about-put-and-get-char.html' title='Know about PUT and GET char'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-1703807273826588809</id><published>2008-01-19T18:11:00.000-08:00</published><updated>2008-01-19T18:12:23.288-08:00</updated><title type='text'>Know about casting</title><content type='html'>/* pgr to know about casting&lt;br /&gt;   written by sekhar &lt;br /&gt;   written on 19/07/07&lt;br /&gt;   modified on 19/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;    int *p;&lt;br /&gt;    short *pi;&lt;br /&gt;    char *pid;&lt;br /&gt;   int x=0x12345678;  &lt;br /&gt;   p=&amp;x;&lt;br /&gt;   pi=(short*)&amp;x;&lt;br /&gt;   pid=(char*)&amp;x;&lt;br /&gt;     printf("%x\n%x\n%x",*p,*pi,*pid);&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-1703807273826588809?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/1703807273826588809/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=1703807273826588809' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1703807273826588809'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1703807273826588809'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/know-about-casting.html' title='Know about casting'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-5759974768342763734</id><published>2008-01-19T18:10:00.002-08:00</published><updated>2008-01-19T18:11:21.271-08:00</updated><title type='text'>Call by reference</title><content type='html'>/*pgr to understand call by reference&lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 13/07/07&lt;br /&gt;  modified on 13/07/07*/&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;void area(int, float *);&lt;br /&gt;&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;   int radius;&lt;br /&gt;   float area1,p;&lt;br /&gt;    scanf("%d",&amp;radius);&lt;br /&gt;  area(radius,&amp;area1);&lt;br /&gt;    printf("%f", area1);&lt;br /&gt;  }&lt;br /&gt; void area(int a,float *b)&lt;br /&gt;  {&lt;br /&gt;   *b=(3.141*a*a);&lt;br /&gt;   &lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-5759974768342763734?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/5759974768342763734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=5759974768342763734' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5759974768342763734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5759974768342763734'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/call-by-reference.html' title='Call by reference'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-5865114226395059379</id><published>2008-01-19T18:10:00.001-08:00</published><updated>2008-01-19T18:10:39.250-08:00</updated><title type='text'>Auto keyword</title><content type='html'>/*pgr to know about auto&lt;br /&gt;  written by sekhar &lt;br /&gt;  written on 18/07/07&lt;br /&gt;  modified on 18/07/07*/&lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt;&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;    int a;&lt;br /&gt;    a=sumdig(12345);&lt;br /&gt;    printf("\n%d",a);&lt;br /&gt;  }&lt;br /&gt;  int sumdig(int num)&lt;br /&gt;  {&lt;br /&gt;    static int sum;&lt;br /&gt;    int a,b;&lt;br /&gt;    a=num%10;&lt;br /&gt;    b=(num-a)/10;&lt;br /&gt;    sum=sum+a;&lt;br /&gt;    if(b!=0)&lt;br /&gt;      sumdig(b);&lt;br /&gt;    else &lt;br /&gt;      return(sum);&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-5865114226395059379?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/5865114226395059379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=5865114226395059379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5865114226395059379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5865114226395059379'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/auto-keyword.html' title='Auto keyword'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-6852125378440169101</id><published>2008-01-19T18:08:00.000-08:00</published><updated>2008-01-19T18:09:37.177-08:00</updated><title type='text'>display ascii code corresponding with digits</title><content type='html'>/* programe to display ascii code corresponding with digits &lt;br /&gt;   written date 05/07/07&lt;br /&gt;   modified date 05/07/07&lt;br /&gt;   written by :sekhar*/&lt;br /&gt;&lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt;  main()&lt;br /&gt;    {&lt;br /&gt;     char ch=' '; //=128;  to know the perticular number status&lt;br /&gt;    // for(ch=0;ch&lt;127;ch++)&lt;br /&gt;    // do&lt;br /&gt;    &lt;br /&gt;      printf("\t%d ",ch);&lt;br /&gt;     // ch=ch++;             &lt;br /&gt;    // while(ch++&lt;127);&lt;br /&gt;    }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-6852125378440169101?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/6852125378440169101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=6852125378440169101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6852125378440169101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6852125378440169101'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/display-ascii-code-corresponding-with.html' title='display ascii code corresponding with digits'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-5245860924336213175</id><published>2008-01-19T18:06:00.000-08:00</published><updated>2008-01-19T18:08:45.912-08:00</updated><title type='text'>sorting the Array</title><content type='html'>#include&lt;stdio.h&gt;&lt;br /&gt; main()&lt;br /&gt;  {&lt;br /&gt;   int a[5],x,t,j,n,i;&lt;br /&gt;   printf("Enter array size:");&lt;br /&gt;   scanf("%d", &amp;n);&lt;br /&gt;    printf("Enter array values\n");&lt;br /&gt;    for(i=0;i&lt;(n);i++)&lt;br /&gt;      scanf("%d",&amp;a[i]);&lt;br /&gt;    for(x=0;x&lt;=10;x++)&lt;br /&gt;     {&lt;br /&gt;       i=0;&lt;br /&gt;        for(j=0;j&lt;(n-1);j++)&lt;br /&gt;        {&lt;br /&gt;            &lt;br /&gt;            if(a[i]&lt;=a[++i])&lt;br /&gt;            {&lt;br /&gt;            // printf("%d %d %d",i,a[i],t); &lt;br /&gt;            // printf("%d",i);&lt;br /&gt;               t=a[i];&lt;br /&gt;               a[i]=a[--i];&lt;br /&gt;            // printf("%d %d %d",i,a[i],t); &lt;br /&gt;               a[i]=t;&lt;br /&gt;              // ++i; &lt;br /&gt;            // printf("%d %d %d",i,a[i],t); &lt;br /&gt;            }&lt;br /&gt;            // printf("\n%d",a[--i]);&lt;br /&gt;  // for(i=0;i&lt;(n);i++)&lt;br /&gt;    //  printf(" %d ",a[i]);&lt;br /&gt;         }                     //if block ends&lt;br /&gt;     //printf("\n%d",a[i]);&lt;br /&gt;     } &lt;br /&gt;    printf("After sorting array values are\n");               // for loop ends&lt;br /&gt;   for(i=0;i&lt;(n);i++)&lt;br /&gt;      printf("%d\n",a[i]);&lt;br /&gt;&lt;br /&gt;  }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-5245860924336213175?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/5245860924336213175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=5245860924336213175' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5245860924336213175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5245860924336213175'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/sorting-array_19.html' title='sorting the Array'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-961482098103515510</id><published>2008-01-19T18:03:00.000-08:00</published><updated>2008-01-19T18:06:23.974-08:00</updated><title type='text'>sorting array</title><content type='html'>/* prg to use arrays&lt;br /&gt;writtenby sekhar&lt;br /&gt;written on 09/07/07&lt;br /&gt;modified on 09/07/07*/&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;int a[5],i,t,j,n;&lt;br /&gt;printf("Enter array size:");&lt;br /&gt;scanf("%d", &amp;amp;n);&lt;br /&gt;printf("Enter array values\n");&lt;br /&gt;for(i=0;i&lt;(n);i++)&lt;br /&gt;scanf("%d",&amp;amp;a[i]);&lt;br /&gt;for(i=0;i&lt;(n-1);i++)&lt;br /&gt;{&lt;br /&gt;for(j=i;j&lt;(n);j++)&lt;br /&gt;{&lt;br /&gt;if(a[i]&lt;=a[j])&lt;br /&gt;{&lt;br /&gt;//printf("\n%d",a[i]);&lt;br /&gt;t=a[i];&lt;br /&gt;a[i]=a[j];&lt;br /&gt;a[j]=t;&lt;br /&gt;}&lt;br /&gt;// printf("\n%d",a[--i]);&lt;br /&gt;} //if block ends&lt;br /&gt;//printf("\n%d",a[i]);&lt;br /&gt;}&lt;br /&gt;printf("After sorting array values are\n"); // for loop ends&lt;br /&gt;for(i=0;i&lt;(n);i++)&lt;br /&gt;printf("%d\n",a[i]);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-961482098103515510?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/961482098103515510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=961482098103515510' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/961482098103515510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/961482098103515510'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/sorting-array.html' title='sorting array'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-8821377675963590972</id><published>2008-01-19T18:02:00.000-08:00</published><updated>2008-01-19T18:03:06.996-08:00</updated><title type='text'>pointers in arrays</title><content type='html'>/*prg to know the array in pointers&lt;br /&gt;written by sekhar&lt;br /&gt;written on 20/07/07&lt;br /&gt;modified on 20/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;int a[5]={5,1,15,45,47};&lt;br /&gt;int i,j,k=1,m;&lt;br /&gt;i=++a[1];&lt;br /&gt;printf("\n%d",i);&lt;br /&gt;j=a[1]++;&lt;br /&gt;printf("\n%d",j);&lt;br /&gt;m=a[i++];&lt;br /&gt;printf("\n%d%d%d%d",i,j,m,a[1]);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-8821377675963590972?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/8821377675963590972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=8821377675963590972' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/8821377675963590972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/8821377675963590972'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/pointers-in-arrays.html' title='pointers in arrays'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-6749723923786055826</id><published>2008-01-19T18:00:00.001-08:00</published><updated>2008-01-19T18:00:56.082-08:00</updated><title type='text'>Orogram for status of student</title><content type='html'>/*program for status of students&lt;br /&gt;written by sekhar&lt;br /&gt;written on 19/07/07&lt;br /&gt;modified on 19/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;void fillmarks(int a[]); //prototype for filling the marks of students&lt;br /&gt;void printmarks(int *); //prototype for print the marks of students&lt;br /&gt;int maxmark(int *); // prototype for calcul;ate max mark of the sudent&lt;br /&gt;int minmark(int *); //prototype for calculate minimum marks&lt;br /&gt;int average(int *); //prototype for know the status each and every student&lt;br /&gt;void pass1(int *);&lt;br /&gt;void fail1(int *);&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;int array[10],max,min,aver,i,pass,fail ;&lt;br /&gt;fillmarks(array); //function call for fill the marks&lt;br /&gt;printmarks(array); // function call for print the marks&lt;br /&gt;while(1)&lt;br /&gt;{&lt;br /&gt;printf("enter your option 1:max mark2:min mark 3:avg mark 4:pass count 5: fail count 6: exit");&lt;br /&gt;printf("enter i value:");&lt;br /&gt;scanf("%d",&amp;amp;i);&lt;br /&gt;switch(i)&lt;br /&gt;{&lt;br /&gt;case 1:&lt;br /&gt;max=maxmark(array); //function call for max mark&lt;br /&gt;printf("\nhighest mark in the classis %d",max);&lt;br /&gt;break;&lt;br /&gt;case 2:&lt;br /&gt;min=minmark(array); //function call for find min mark&lt;br /&gt;printf("\n lowest mark in the class in %d",min);&lt;br /&gt;break;&lt;br /&gt;case 3:&lt;br /&gt;aver=average(array);&lt;br /&gt;printf("\n average marks of th class is %d",aver);&lt;br /&gt;break;&lt;br /&gt;case 4:&lt;br /&gt;pass1(array);&lt;br /&gt;break;&lt;br /&gt;case 5:&lt;br /&gt;fail1(array);&lt;br /&gt;break;&lt;br /&gt;case 6:&lt;br /&gt;exit();&lt;br /&gt;default:&lt;br /&gt;printf("wronge ");&lt;br /&gt;break;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;void fillmarks(int a[])&lt;br /&gt;{&lt;br /&gt;int i;&lt;br /&gt;printf("enter the marks");&lt;br /&gt;for(i=0;i&lt;=9;i++)&lt;br /&gt;scanf("%d",&amp;amp;a[i]);&lt;br /&gt;}&lt;br /&gt;void printmarks(int *a)&lt;br /&gt;{&lt;br /&gt;int i;&lt;br /&gt;printf("this is what you enter the marks");&lt;br /&gt;for(i=0;i&lt;=9;i++)&lt;br /&gt;printf("\t%d",a[i]);&lt;br /&gt;}&lt;br /&gt;int maxmark(int *b)&lt;br /&gt;{&lt;br /&gt;int i,t;&lt;br /&gt;for(i=0;i&lt;=9;i++)&lt;br /&gt;{&lt;br /&gt;if(b[0]&lt;=b[i])&lt;br /&gt;{&lt;br /&gt;t=b[0];&lt;br /&gt;b[0]=b[i];&lt;br /&gt;b[i]=t;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;return(b[0]);&lt;br /&gt;}&lt;br /&gt;int minmark(int *b)&lt;br /&gt;{&lt;br /&gt;int i,t;&lt;br /&gt;for(i=0;i&lt;=9;i++)&lt;br /&gt;{&lt;br /&gt;if(b[0]&gt;=b[i])&lt;br /&gt;{&lt;br /&gt;t=b[0];&lt;br /&gt;b[0]=b[i];&lt;br /&gt;b[i]=t;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;return(b[0]);&lt;br /&gt;}&lt;br /&gt;int average(int *marks)&lt;br /&gt;{&lt;br /&gt;int i,t=0,ave;&lt;br /&gt;for(i=0;i&lt;=9;i++)&lt;br /&gt;{&lt;br /&gt;t=t+marks[i];&lt;br /&gt;}&lt;br /&gt;ave=t/i;&lt;br /&gt;return(ave);&lt;br /&gt;}&lt;br /&gt;void pass1(int *b)&lt;br /&gt;{&lt;br /&gt;int i,x=0,y=0,z=0;&lt;br /&gt;for(i=0;i&lt;=9;i++)&lt;br /&gt;{&lt;br /&gt;if(b[i]&gt;=75)&lt;br /&gt;x=x+1;&lt;br /&gt;if(b[i]&gt;=60 &amp;amp;&amp;amp; b[i]&lt;75)&lt;br /&gt;y=y+1;&lt;br /&gt;if(b[i]&gt;=35 &amp;amp;&amp;amp; b[i]&lt;60)&lt;br /&gt;z=z+1;&lt;br /&gt;}&lt;br /&gt;printf("\n %d are got distiction",x);&lt;br /&gt;printf("\n %d are got firstclass",y);&lt;br /&gt;printf("\n %d are got second class",z);&lt;br /&gt;}&lt;br /&gt;void fail1(int *b)&lt;br /&gt;{&lt;br /&gt;int i,x=0,y=0,z=0;&lt;br /&gt;for(i=0;i&lt;=9;i++)&lt;br /&gt;{&lt;br /&gt;if(b[i]&lt;=35)&lt;br /&gt;x=x+1;&lt;br /&gt;}&lt;br /&gt;printf("\n%d failed in this subject" ,x);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-6749723923786055826?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/6749723923786055826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=6749723923786055826' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6749723923786055826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6749723923786055826'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/orogram-for-status-of-student.html' title='Orogram for status of student'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-1210911292441486185</id><published>2008-01-19T17:49:00.000-08:00</published><updated>2008-01-19T17:59:59.118-08:00</updated><title type='text'>Multiplication of matrices</title><content type='html'>/*prg to for multiflication of matrixes&lt;br /&gt;written by sekhar&lt;br /&gt;written on 16/07/07&lt;br /&gt;modified on 18/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;int s,i,j,k,l,m,n,o,x,y,a[6][6],b[6][6],c[6][6],d[6];&lt;br /&gt;printf("enter the order of matrix");&lt;br /&gt;scanf("%d",&amp;amp;s);&lt;br /&gt;printf("enter the elements of first matrix\n");&lt;br /&gt;for(i=0;i&lt;s;i++)&gt;{&lt;br /&gt;for(j=0;j&lt;s;j++)&gt;{&lt;br /&gt;printf("\nenter(%d,%d)element:",i,j);&lt;br /&gt;scanf("%d",&amp;amp;a[i][j]);&lt;br /&gt;}&lt;br /&gt;printf("\n");&lt;br /&gt;} //scan of first matrix&lt;br /&gt;printf("enter the elements of second matrix\n");&lt;br /&gt;for(k=0;k&lt;s;k++)&gt;{&lt;br /&gt;for(l=0;l&lt;s;l++)&gt;{&lt;br /&gt;printf("\nenter(%d,%d)element:",k,l);&lt;br /&gt;scanf("%d",&amp;amp;b[k][l]);&lt;br /&gt;}&lt;br /&gt;printf("\n");&lt;br /&gt;} //scan of second matrix&lt;br /&gt;for(m=0;m&lt;s;m++)&gt;{&lt;br /&gt;for(n=0;n&lt;s;n++)&gt;{&lt;br /&gt;y=0;&lt;br /&gt;for(o=0;o&lt;s;o++)&gt;d[o]=a[m][o]*b[o][n];&lt;br /&gt;for(x=0;x&lt;s;x++)&gt;y=y+d[x];&lt;br /&gt;c[m][n]=y;&lt;br /&gt;printf("\t%d",c[m][n]);&lt;br /&gt;}&lt;br /&gt;printf("\n");&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-1210911292441486185?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/1210911292441486185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=1210911292441486185' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1210911292441486185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/1210911292441486185'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/multiplication-of-matrices.html' title='Multiplication of matrices'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-6429397382140384267</id><published>2008-01-19T17:48:00.000-08:00</published><updated>2008-01-19T17:49:34.741-08:00</updated><title type='text'>array  display as matrix</title><content type='html'>/* pgr on array to display matrix&lt;br /&gt;   written by sekhar&lt;br /&gt;   written on 16/07/07&lt;br /&gt;   modified on 16/07/07 */&lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt;  main()&lt;br /&gt;  { &lt;br /&gt;    int matrix[3][3],i,j;&lt;br /&gt;    for(i=1;i&lt;=3;i++)&lt;br /&gt;     {&lt;br /&gt;      for(j=1;j&lt;=3;j++)&lt;br /&gt;       {&lt;br /&gt;         printf("\t(%d,%d)\t",i,j);&lt;br /&gt;         scanf("%d",&amp;matrix[i][j]);&lt;br /&gt;         printf("%u",&amp;matrix[i][j]);&lt;br /&gt;       }&lt;br /&gt;         printf("\n");&lt;br /&gt;     }&lt;br /&gt;      printf("you have entered values\n");&lt;br /&gt;    for(i=1;i&lt;=3;i++)&lt;br /&gt;     {&lt;br /&gt;      for(j=1;j&lt;=3;j++)&lt;br /&gt;       {&lt;br /&gt;        // printf("\t(%d,%d)\t",i,j);&lt;br /&gt;         printf("\t%d",matrix[i][j]);&lt;br /&gt;        // printf("%u",&amp;matrix[i][j]);&lt;br /&gt;       }&lt;br /&gt;         printf("\n");&lt;br /&gt;    }&lt;br /&gt;      printf("%d",sizeof(matrix));&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-6429397382140384267?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/6429397382140384267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=6429397382140384267' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6429397382140384267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/6429397382140384267'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/array-display-as-matrix.html' title='array  display as matrix'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-5292994056559490896</id><published>2008-01-19T17:46:00.002-08:00</published><updated>2008-01-19T17:48:03.409-08:00</updated><title type='text'>Multiplication of charecter array</title><content type='html'>/*pgr for multiplication of charecter array&lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 17/07/07&lt;br /&gt;  modified on 17/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt; {&lt;br /&gt;   int i,j,k,l,m,n,o;&lt;br /&gt;   char a[3][3],b[3][3],c[3][3],d[3];&lt;br /&gt;     printf("enter the elements of first matrix\n");&lt;br /&gt;     for(i=1;i&lt;=3;i++)&lt;br /&gt;      {&lt;br /&gt;       for(j=1;j&lt;=3;j++)&lt;br /&gt;        {&lt;br /&gt;          printf("\nenter(%d,%d)element:",i,j);&lt;br /&gt;          scanf("%c",&amp;a[i][j]);&lt;br /&gt;        }&lt;br /&gt;         printf("\n");&lt;br /&gt;      }                        //scan of first matrix&lt;br /&gt;     printf("enter the elements of second matrix\n");&lt;br /&gt;     for(k=1;k&lt;=3;k++)&lt;br /&gt;      {&lt;br /&gt;       for(l=1;l&lt;=3;l++)&lt;br /&gt;        {&lt;br /&gt;          printf("\nenter(%d,%d)element:",k,l);&lt;br /&gt;          scanf("%c",&amp;b[k][l]);&lt;br /&gt;        }&lt;br /&gt;          printf("\n");&lt;br /&gt;      }                      //scan of second matrix  &lt;br /&gt;     for(m=1;m&lt;=3;m++)&lt;br /&gt;      {&lt;br /&gt;       for(n=1;n&lt;=3;n++)&lt;br /&gt;        {&lt;br /&gt;          for(o=1;o&lt;=3;o++)&lt;br /&gt;          d[o]=a[m][o]*b[o][n];&lt;br /&gt;        c[m][n]=d[1]+d[2]+d[3];&lt;br /&gt;        printf("\t%c",c[m][n]);&lt;br /&gt;        }&lt;br /&gt;        printf("\n");&lt;br /&gt;      }&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-5292994056559490896?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/5292994056559490896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=5292994056559490896' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5292994056559490896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/5292994056559490896'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/multiplication-of-charecter-array.html' title='Multiplication of charecter array'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-419605625737462552</id><published>2008-01-19T17:46:00.001-08:00</published><updated>2008-01-19T17:46:44.009-08:00</updated><title type='text'>Largest number in 2 dim Array</title><content type='html'>/*pgr to find largest number in 2 dimensional array&lt;br /&gt;  written by sekhar&lt;br /&gt;  written on 20/07/07&lt;br /&gt;  modified on 20/07/07 */&lt;br /&gt;&lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt;  main()&lt;br /&gt;   {&lt;br /&gt;     int a[3][3],i,j,t;&lt;br /&gt;    for(i=0;i&lt;=2;i++)&lt;br /&gt;     {&lt;br /&gt;       for(j=0;j&lt;=2;j++)&lt;br /&gt;        {&lt;br /&gt;          scanf("%d",&amp;a[i][j]);&lt;br /&gt;        }&lt;br /&gt;     } &lt;br /&gt;     for(i=0;i&lt;=2;i++)&lt;br /&gt;      { &lt;br /&gt;       for(j=0;j&lt;=2;j++)&lt;br /&gt;        {&lt;br /&gt;         if(a[0][0]&lt;=a[i][j])&lt;br /&gt;           {&lt;br /&gt;             t=a[0][0];&lt;br /&gt;             a[0][0]=a[i][j];&lt;br /&gt;             a[i][j]=t;&lt;br /&gt;          &lt;br /&gt;           }&lt;br /&gt;         // printf("\n%d",a[0][0]);&lt;br /&gt;        } &lt;br /&gt;      }&lt;br /&gt;     printf("greatest\n%d",a[0][0]);&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-419605625737462552?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/419605625737462552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=419605625737462552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/419605625737462552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/419605625737462552'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/largest-number-in-2-dim-array.html' title='Largest number in 2 dim Array'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-4862529211860931461</id><published>2008-01-19T17:44:00.000-08:00</published><updated>2008-01-19T17:45:29.713-08:00</updated><title type='text'>arp request in LAN</title><content type='html'>/* pgr pass arp packet into function &lt;br /&gt;   print packet in the field wise in the function &lt;br /&gt;   written by sekhar &lt;br /&gt;   written on 26/07/07&lt;br /&gt;   modified on 26/07/07 */&lt;br /&gt; #include&lt;stdio.h&gt;&lt;br /&gt;  void arp_request_lan(char *,char *,char *);&lt;br /&gt; // void arp_responce_lan(int *); &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt; main()  &lt;br /&gt;  { &lt;br /&gt;      int i;&lt;br /&gt;      struct arp&lt;br /&gt;       { &lt;br /&gt;         char name[10];&lt;br /&gt;         char length[4];&lt;br /&gt;         char value[28];&lt;br /&gt;       };&lt;br /&gt;      struct arp field[9];    &lt;br /&gt;    for(i=0;i&lt;=8;i++)     &lt;br /&gt;     {   &lt;br /&gt;       printf("enter values for field[%d]",i);&lt;br /&gt;       scanf("%s%s%s",field[i].name,field[i].length,field[i].value);&lt;br /&gt;       printf("\n %x  %x    %x",field[i].name,field[i].length,field[i].value);&lt;br /&gt;    }&lt;br /&gt;      arp_request_lan(field[0].name,field[0].length,field[0].value);  &lt;br /&gt;}&lt;br /&gt;//function calling for print the arp packet &lt;br /&gt;void arp_request_lan(char *name,char *lenth,char *value)&lt;br /&gt; {&lt;br /&gt; char i,a;&lt;br /&gt; int x;&lt;br /&gt;  for(i=0;i&lt;=8;i++)&lt;br /&gt;   {&lt;br /&gt;    x=41*i;&lt;br /&gt;   // a=10*i;&lt;br /&gt;    printf("%s  %s   %s\n",(name+i+x),(lenth+i+x),(value+x+i));&lt;br /&gt;   }&lt;br /&gt; }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-4862529211860931461?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/4862529211860931461/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=4862529211860931461' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4862529211860931461'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4862529211860931461'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2008/01/arp-request-in-lan.html' title='arp request in LAN'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-508737738943192254</id><published>2007-12-11T00:51:00.000-08:00</published><updated>2007-12-11T00:52:32.584-08:00</updated><title type='text'>LINKED LIST OPERATIONS</title><content type='html'>#include&lt;stdio.h&gt;&lt;br /&gt; typedef struct linkedlist&lt;br /&gt; {&lt;br /&gt;   int rollno;&lt;br /&gt;   char name[20];&lt;br /&gt;   char branch[20];&lt;br /&gt;   int marks;&lt;br /&gt;   char remarks[20];&lt;br /&gt;   struct linkedlist *next;&lt;br /&gt;  }stu_t;&lt;br /&gt;  stu_t *insert(stu_t *);&lt;br /&gt;  stu_t *delete(stu_t *);&lt;br /&gt;  stu_t *update(stu_t *); &lt;br /&gt;  void *display(stu_t *); &lt;br /&gt;  main()&lt;br /&gt;  {&lt;br /&gt;  int option,status;&lt;br /&gt;  stu_t *head;&lt;br /&gt;  head=(stu_t *)malloc(sizeof(stu_t));&lt;br /&gt;&lt;br /&gt; while(1) &lt;br /&gt; {&lt;br /&gt;  puts("enter the option  1: insert 2:delete 3:update 4:sort 5:display 6:search 7:exit");  &lt;br /&gt;  scanf("%d",&amp;option);&lt;br /&gt;  switch(option)&lt;br /&gt;  {&lt;br /&gt;   case 1:&lt;br /&gt;          puts("enter roll no,name,branch,marks,remarks");&lt;br /&gt;          head=insert(head);&lt;br /&gt;          /* if(status==0)&lt;br /&gt;             printf("operation is success");&lt;br /&gt;           else&lt;br /&gt;             printf("operation is denied");*/&lt;br /&gt;          break;&lt;br /&gt;   case 2:&lt;br /&gt;          head=delete(head);&lt;br /&gt;          break;&lt;br /&gt;   case 3:&lt;br /&gt;          head=update(head);&lt;br /&gt;          break;&lt;br /&gt;                        &lt;br /&gt;   case 5:&lt;br /&gt;          display(head);&lt;br /&gt;          break; &lt;br /&gt;          &lt;br /&gt;   case 6:&lt;br /&gt;          exit();&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;stu_t *insert(stu_t *head)&lt;br /&gt;{&lt;br /&gt;  int option,b4number;&lt;br /&gt;  char value='y';&lt;br /&gt;  stu_t *new,*temp,*list;&lt;br /&gt;  list=head;&lt;br /&gt;  temp=head;&lt;br /&gt;  puts("enter the option 1:bottom 2:middle 3:top");&lt;br /&gt;   scanf("%d",&amp;option);&lt;br /&gt;  switch(option)&lt;br /&gt;  {&lt;br /&gt;   case 1:&lt;br /&gt;          while(value=='y')&lt;br /&gt;          {&lt;br /&gt;           printf("enter the details");&lt;br /&gt;          scanf("%d%s%s%d%s",&amp;list-&gt;rollno,list-&gt;name,list-&gt;branch,&amp;list-&gt;marks,list-&gt;remarks);          &lt;br /&gt;          new=(stu_t *)malloc(sizeof(stu_t));&lt;br /&gt;          list-&gt;next=new;&lt;br /&gt;          list=new;&lt;br /&gt;           puts("enter the option you want to add another record y:yes n:no");&lt;br /&gt;           __fpurge(stdin);&lt;br /&gt;           scanf("%c",&amp;value);  &lt;br /&gt;          }            &lt;br /&gt;           if(value!='y')&lt;br /&gt;            list-&gt;next=0;&lt;br /&gt;          return head;        &lt;br /&gt;                &lt;br /&gt;   case 2: &lt;br /&gt;           while(value=='y')&lt;br /&gt;           {&lt;br /&gt;             puts("enter the position where u want to enter");&lt;br /&gt;             scanf("%d",&amp;b4number);&lt;br /&gt;             puts("enter the new fields");&lt;br /&gt;             new=(stu_t *)malloc(sizeof(stu_t));&lt;br /&gt;              scanf("%d%s%s%d%s",&amp;new-&gt;rollno,new-&gt;name,new-&gt;branch,&amp;new-&gt;marks,new-&gt;remarks);&lt;br /&gt;             while(temp-&gt;next)&lt;br /&gt;             { &lt;br /&gt;             if(temp-&gt;rollno==b4number)&lt;br /&gt;              { &lt;br /&gt;               new-&gt;next=temp-&gt;next;&lt;br /&gt;               temp-&gt;next=new;&lt;br /&gt;              }&lt;br /&gt;              temp=temp-&gt;next;&lt;br /&gt;             } &lt;br /&gt;              puts("if you want ot add another option please press 'y'");&lt;br /&gt;              __fpurge(stdin);&lt;br /&gt;              scanf("%c",&amp;value);             &lt;br /&gt;            }&lt;br /&gt;            &lt;br /&gt;    case 3:&lt;br /&gt;            while(value=='y')&lt;br /&gt;           {&lt;br /&gt;            puts("enter the fields");&lt;br /&gt;            new=(stu_t *)malloc(sizeof(stu_t));&lt;br /&gt;            scanf("%d%s%s%d%s",&amp;new-&gt;rollno,new-&gt;name,new-&gt;branch,&amp;new-&gt;marks,new-&gt;remarks);&lt;br /&gt;            new-&gt;next=head;&lt;br /&gt;            head=new;&lt;br /&gt;            puts("if you want ot add another option please press 'y'");&lt;br /&gt;            __fpurge(stdin);&lt;br /&gt;            scanf("%c",&amp;value);        &lt;br /&gt;           }&lt;br /&gt;           return head;      &lt;br /&gt;             &lt;br /&gt;       }&lt;br /&gt;    } &lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;stu_t *delete(stu_t *head)&lt;br /&gt;{&lt;br /&gt; int i,option,rollno1;&lt;br /&gt; stu_t *temp;&lt;br /&gt; temp=head; &lt;br /&gt; puts("from where you want to delete 1:top 2:middle 3:bottom");&lt;br /&gt; scanf("%d",&amp;option);&lt;br /&gt; switch(option)&lt;br /&gt; {&lt;br /&gt;  case 1:&lt;br /&gt;         head=head-&gt;next;&lt;br /&gt;         return head;&lt;br /&gt;  case 2:&lt;br /&gt;         puts("plz enter the rollno u want to delete");&lt;br /&gt;         scanf("%d",&amp;rollno1);&lt;br /&gt;         while(temp-&gt;next)&lt;br /&gt;         {&lt;br /&gt;           if(temp-&gt;next-&gt;rollno==rollno1)&lt;br /&gt;           {&lt;br /&gt;            temp-&gt;next=temp-&gt;next-&gt;next;&lt;br /&gt;           }&lt;br /&gt;           temp=temp-&gt;next;&lt;br /&gt;          }&lt;br /&gt;         return head;&lt;br /&gt;   case 3:   &lt;br /&gt;          while(temp-&gt;next)&lt;br /&gt;          {&lt;br /&gt;           if(temp-&gt;next-&gt;next==0)&lt;br /&gt;           {&lt;br /&gt;           temp-&gt;next=0;&lt;br /&gt;           return head; &lt;br /&gt;           }&lt;br /&gt;          temp=temp-&gt;next; &lt;br /&gt;          }&lt;br /&gt;          &lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;stu_t *update(stu_t *head)&lt;br /&gt;{&lt;br /&gt; int rollno1;&lt;br /&gt; stu_t *temp;&lt;br /&gt; temp=head;&lt;br /&gt; puts("enter the old roll no of student to modify the details");&lt;br /&gt; scanf("%d",&amp;rollno1);&lt;br /&gt; while(temp-&gt;next)&lt;br /&gt; {&lt;br /&gt;  if(temp-&gt;rollno==rollno1)&lt;br /&gt;  {&lt;br /&gt;  puts("now enter the new values of student");&lt;br /&gt;  scanf("%d%s%s%d%s",&amp;temp-&gt;rollno,temp-&gt;name,temp-&gt;branch,&amp;temp-&gt;marks,temp-&gt;remarks);&lt;br /&gt;  }&lt;br /&gt;  temp=temp-&gt;next;  &lt;br /&gt; }&lt;br /&gt; return head;&lt;br /&gt;}&lt;br /&gt;            &lt;br /&gt; &lt;br /&gt;         &lt;br /&gt;  &lt;br /&gt;void *display(stu_t *head)&lt;br /&gt;{&lt;br /&gt; while(head-&gt;next!=0)&lt;br /&gt; {&lt;br /&gt;  printf("%d\t%s\t%s\t%d\t%s\n",head-&gt;rollno,head-&gt;name,head-&gt;branch,head-&gt;marks,head-&gt;remarks);&lt;br /&gt;  head=head-&gt;next;&lt;br /&gt; }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-508737738943192254?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/508737738943192254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=508737738943192254' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/508737738943192254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/508737738943192254'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2007/12/linked-list-operations.html' title='LINKED LIST OPERATIONS'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-373898085080916025</id><published>2007-10-21T04:51:00.001-07:00</published><updated>2007-10-21T04:56:01.147-07:00</updated><title type='text'>programe for multiplication of 2 matrix of any size</title><content type='html'>/*prg to for multiflication of matrixes&lt;br /&gt;written by sekhar&lt;br /&gt;written on 16/07/07&lt;br /&gt;modified on 18/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;int s,i,j,k,l,m,n,o,x,y,a[6][6],b[6][6],c[6][6],d[6];&lt;br /&gt;printf("enter the order of matrix");&lt;br /&gt;scanf("%d",&amp;amp;s);&lt;br /&gt;printf("enter the elements of first matrix\n");&lt;br /&gt;for(i=0;i&lt;s;i++)&lt;br /&gt;{&lt;br /&gt;for(j=0;j&lt;s;j++)&lt;br /&gt;{&lt;br /&gt;printf("\nenter(%d,%d)element:",i,j);&lt;br /&gt;scanf("%d",&amp;amp;a[i][j]);&lt;br /&gt;}&lt;br /&gt;printf("\n");&lt;br /&gt;} //scan of first matrix&lt;br /&gt;printf("enter the elements of second matrix\n");&lt;br /&gt;for(k=0;k&lt;s;k++)&lt;br /&gt;{&lt;br /&gt;for(l=0;l&lt;s;l++)&lt;br /&gt;{&lt;br /&gt;printf("\nenter(%d,%d)element:",k,l);&lt;br /&gt;scanf("%d",&amp;amp;b[k][l]);&lt;br /&gt;}&lt;br /&gt;printf("\n");&lt;br /&gt;} //scan of second matrix&lt;br /&gt;for(m=0;m&lt;s;m++)&lt;br /&gt;{&lt;br /&gt;for(n=0;n&lt;s;n++)&lt;br /&gt;{&lt;br /&gt;y=0;&lt;br /&gt;for(o=0;o&lt;s;o++)&lt;br /&gt;d[o]=a[m][o]*b[o][n];&lt;br /&gt;for(x=0;x&lt;s;x++)&lt;br /&gt;y=y+d[x];&lt;br /&gt;c[m][n]=y;&lt;br /&gt;printf("\t%d",c[m][n]);&lt;br /&gt;}&lt;br /&gt;printf("\n");&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-373898085080916025?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/373898085080916025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=373898085080916025' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/373898085080916025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/373898085080916025'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2007/10/programe-for-multiplication-of-2-matrix.html' title='programe for multiplication of 2 matrix of any size'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-2973782407344113143</id><published>2007-10-21T04:48:00.000-07:00</published><updated>2007-10-21T04:50:56.791-07:00</updated><title type='text'>programe to display elements in matrix formate what we have entered</title><content type='html'>/* pgr on array to display matrix&lt;br /&gt;written by sekhar&lt;br /&gt;written on 16/07/07&lt;br /&gt;modified on 16/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;int matrix[3][3],i,j;&lt;br /&gt;for(i=1;i&lt;=3;i++)&lt;br /&gt;{&lt;br /&gt;for(j=1;j&lt;=3;j++)&lt;br /&gt;{&lt;br /&gt;printf("\t(%d,%d)\t",i,j);&lt;br /&gt;scanf("%d",&amp;amp;matrix[i][j]);&lt;br /&gt;printf("%u",&amp;amp;matrix[i][j]);&lt;br /&gt;}&lt;br /&gt;printf("\n");&lt;br /&gt;}&lt;br /&gt;printf("you have entered values\n");&lt;br /&gt;for(i=1;i&lt;=3;i++)&lt;br /&gt;{&lt;br /&gt;for(j=1;j&lt;=3;j++)&lt;br /&gt;{&lt;br /&gt;// printf("\t(%d,%d)\t",i,j);&lt;br /&gt;printf("\t%d",matrix[i][j]);&lt;br /&gt;// printf("%u",&amp;amp;matrix[i][j]);&lt;br /&gt;}&lt;br /&gt;printf("\n");&lt;br /&gt;}&lt;br /&gt;printf("%d",sizeof(matrix));&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-2973782407344113143?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/2973782407344113143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=2973782407344113143' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2973782407344113143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2973782407344113143'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2007/10/programe-to-display-elements-in-matrix.html' title='programe to display elements in matrix formate what we have entered'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-2200544085615705127</id><published>2007-10-21T04:47:00.000-07:00</published><updated>2007-10-21T04:48:01.726-07:00</updated><title type='text'>multiplication of 2 matrix</title><content type='html'>/*pgr for multiplication of charecter array&lt;br /&gt;written by sekhar&lt;br /&gt;written on 17/07/07&lt;br /&gt;modified on 17/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;int i,j,k,l,m,n,o;&lt;br /&gt;char a[3][3],b[3][3],c[3][3],d[3];&lt;br /&gt;printf("enter the elements of first matrix\n");&lt;br /&gt;for(i=1;i&lt;=3;i++)&lt;br /&gt;{&lt;br /&gt;for(j=1;j&lt;=3;j++)&lt;br /&gt;{&lt;br /&gt;printf("\nenter(%d,%d)element:",i,j);&lt;br /&gt;scanf("%c",&amp;amp;a[i][j]);&lt;br /&gt;}&lt;br /&gt;printf("\n");&lt;br /&gt;} //scan of first matrix&lt;br /&gt;printf("enter the elements of second matrix\n");&lt;br /&gt;for(k=1;k&lt;=3;k++)&lt;br /&gt;{&lt;br /&gt;for(l=1;l&lt;=3;l++)&lt;br /&gt;{&lt;br /&gt;printf("\nenter(%d,%d)element:",k,l);&lt;br /&gt;scanf("%c",&amp;amp;b[k][l]);&lt;br /&gt;}&lt;br /&gt;printf("\n");&lt;br /&gt;} //scan of second matrix&lt;br /&gt;for(m=1;m&lt;=3;m++)&lt;br /&gt;{&lt;br /&gt;for(n=1;n&lt;=3;n++)&lt;br /&gt;{&lt;br /&gt;for(o=1;o&lt;=3;o++)&lt;br /&gt;d[o]=a[m][o]*b[o][n];&lt;br /&gt;c[m][n]=d[1]+d[2]+d[3];&lt;br /&gt;printf("\t%c",c[m][n]);&lt;br /&gt;}&lt;br /&gt;printf("\n");&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-2200544085615705127?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/2200544085615705127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=2200544085615705127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2200544085615705127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2200544085615705127'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2007/10/multiplication-of-2-matrix.html' title='multiplication of 2 matrix'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-2543242957116364214</id><published>2007-10-21T04:42:00.000-07:00</published><updated>2007-10-21T04:45:51.961-07:00</updated><title type='text'>finding largest number in 2 dim array</title><content type='html'>/*pgr to find largest number in 2 dimensional array&lt;br /&gt;written by sekhar&lt;br /&gt;written on 20/07/07&lt;br /&gt;modified on 20/07/07 */&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;int a[3][3],i,j,t;&lt;br /&gt;for(i=0;i&lt;=2;i++)&lt;br /&gt;{&lt;br /&gt;for(j=0;j&lt;=2;j++)&lt;br /&gt;{&lt;br /&gt;scanf("%d",&amp;amp;a[i][j]);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;for(i=0;i&lt;=2;i++)&lt;br /&gt;{&lt;br /&gt;for(j=0;j&lt;=2;j++)&lt;br /&gt;{&lt;br /&gt;if(a[0][0]&lt;=a[i][j])&lt;br /&gt;{&lt;br /&gt;t=a[0][0];&lt;br /&gt;a[0][0]=a[i][j];&lt;br /&gt;a[i][j]=t;&lt;br /&gt;}&lt;br /&gt;// printf("\n%d",a[0][0]);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;printf("greatest\n%d",a[0][0]);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-2543242957116364214?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/2543242957116364214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=2543242957116364214' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2543242957116364214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/2543242957116364214'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2007/10/finding-largest-number-in-2-dim-array.html' title='finding largest number in 2 dim array'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-4328073410064492747</id><published>2007-10-21T04:34:00.000-07:00</published><updated>2007-10-21T04:42:12.774-07:00</updated><title type='text'>string operations like string copy , string concat,str word count,string length,string compare</title><content type='html'>/* pgr to find string operations in infinite loop&lt;br /&gt;written by sekhar&lt;br /&gt;written on 30/07/07*/&lt;br /&gt;#include&lt;stdio.h&gt;&lt;br /&gt;void string_copy(char *,char *);&lt;br /&gt;void string_concat(char *,char *);&lt;br /&gt;void string_word_count(char *,int *);&lt;br /&gt;int string_length(char *);&lt;br /&gt;int string_cmp(char *,char *);&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;int option,count=0,x,y;&lt;br /&gt;char str1[40],str2[40],strs1[40],strs2[40];&lt;br /&gt;puts("enter the string:");&lt;br /&gt;gets(str1);&lt;br /&gt;while(1)&lt;br /&gt;{&lt;br /&gt;printf("1:for string copy, 2;string concatenate3:count string word count,4:strig length");&lt;br /&gt;scanf("%d",&amp;amp;option);&lt;br /&gt;switch(option)&lt;br /&gt;{&lt;br /&gt;case 1:&lt;br /&gt;string_copy(str1,str2);&lt;br /&gt;puts(str2);&lt;br /&gt;break;&lt;br /&gt;case 2:&lt;br /&gt;string_concat(str1,str2);&lt;br /&gt;puts(str1);&lt;br /&gt;break;&lt;br /&gt;case 3:&lt;br /&gt;string_word_count(str1,&amp;amp;count);&lt;br /&gt;printf("%d",count);&lt;br /&gt;break;&lt;br /&gt;case 4:&lt;br /&gt;x=string_length(str1);&lt;br /&gt;printf("%d",x);&lt;br /&gt;break;&lt;br /&gt;case 5:&lt;br /&gt;puts("enter first string for compare:");&lt;br /&gt;gets(strs1);&lt;br /&gt;puts("enter second string for compare:");&lt;br /&gt;gets(strs2);&lt;br /&gt;y=string_cmp(strs1,strs2);&lt;br /&gt;printf("%d",y);&lt;br /&gt;break;&lt;br /&gt;/* case 6:&lt;br /&gt;string_char_str();&lt;br /&gt;break;*/&lt;br /&gt;case 7:&lt;br /&gt;exit();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;void string_copy(char *s1,char *s2)&lt;br /&gt;{&lt;br /&gt;while(*s1!='\0')&lt;br /&gt;*s2++=*s1++;&lt;br /&gt;*s2='\0';&lt;br /&gt;}&lt;br /&gt;void string_concat(char *s1,char *s2)&lt;br /&gt;{&lt;br /&gt;while(*++s1!='\0')&lt;br /&gt;*s1=*s1;&lt;br /&gt;puts(s2);&lt;br /&gt;while(*s2!='\0')&lt;br /&gt;{&lt;br /&gt;puts(s2);&lt;br /&gt;*s1++=*s2++;&lt;br /&gt;}&lt;br /&gt;*s1='\0';&lt;br /&gt;}&lt;br /&gt;//function for word length&lt;br /&gt;void string_word_count(char *s1, int *cou)&lt;br /&gt;{&lt;br /&gt;while(*s1++!='\0')&lt;br /&gt;{&lt;br /&gt;if(*s1==32*s1=='\0') // 32 in ascii equelent of ' '&lt;br /&gt;{&lt;br /&gt;*cou=*cou+1;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;//function for calculate string length&lt;br /&gt;int string_length(char *s1)&lt;br /&gt;{&lt;br /&gt;int cou=0;&lt;br /&gt;while(*s1++!='\0')&lt;br /&gt;{&lt;br /&gt;cou++;&lt;br /&gt;}&lt;br /&gt;return cou;&lt;br /&gt;}&lt;br /&gt;//function for compare two strings&lt;br /&gt;int string_cmp(char *s1,char *s2)&lt;br /&gt;{&lt;br /&gt;int co=0;&lt;br /&gt;while(*s1++!='\0'&amp;amp;&amp;amp;*s2++!='\0')&lt;br /&gt;{&lt;br /&gt;co=*s1-*s2;&lt;br /&gt;}&lt;br /&gt;return co;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-4328073410064492747?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/4328073410064492747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=4328073410064492747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4328073410064492747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4328073410064492747'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2007/10/string-operations-like-string-copy.html' title='string operations like string copy , string concat,str word count,string length,string compare'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry><entry><id>tag:blogger.com,1999:blog-7022819833043768245.post-4640200849331343541</id><published>2007-08-28T07:13:00.000-07:00</published><updated>2007-08-28T10:01:21.362-07:00</updated><title type='text'>C program for update time by 1 sec</title><content type='html'>/*pgr to update time by 1 sec&lt;br /&gt;written by sekhar&lt;br /&gt;written on 08/08/07&lt;br /&gt;modified on 08/08/07 */&lt;br /&gt;#include stdio.h&lt;br /&gt;typedef struct&lt;br /&gt;{&lt;br /&gt;int sec;&lt;br /&gt;int min;&lt;br /&gt;int hours;&lt;br /&gt;} time_t;&lt;br /&gt;void update_time(time_t *,time_t *);&lt;br /&gt;main()&lt;br /&gt;{&lt;br /&gt;time_t present,updated;&lt;br /&gt;puts("enter the present time in hh:mm:ss");&lt;br /&gt;scanf("%d%d%d",&amp;present.hours,&amp;amp;present.min,&amp;present.sec);&lt;br /&gt;printf("%d:%d:%d",present.hours,present.min,present.sec);&lt;br /&gt;while(1)&lt;br /&gt;{&lt;br /&gt;update_time(&amp;present,&amp;amp;amp;amp;amp;amp;amp;amp;updated);&lt;br /&gt;printf("\n%d:%d:%d",updated.hours,updated.min,updated.sec);&lt;br /&gt;present=updated;&lt;br /&gt;if(present.hours==13)&lt;br /&gt;exit();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;// function description&lt;br /&gt;void update_time(time_t *time1,time_t *time2)&lt;br /&gt;{&lt;br /&gt;if(time1-&gt;sec!=59)&lt;br /&gt;{&lt;br /&gt;time2-&gt;sec=time1-&gt;sec+1;&lt;br /&gt;time2-&gt;min=time1-&gt;min;&lt;br /&gt;time2-&gt;hours=time1-&gt;hours;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;if(time1-&gt;min!=59)&lt;br /&gt;{ time2-&gt;sec=0;&lt;br /&gt;time2-&gt;min=time1-&gt;min+1;&lt;br /&gt;time2-&gt;hours=time1-&gt;hours;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;time2-&gt;sec=0;&lt;br /&gt;time2-&gt;min=0;&lt;br /&gt;time2-&gt;hours=time1-&gt;hours+1;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7022819833043768245-4640200849331343541?l=cheaven.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cheaven.blogspot.com/feeds/4640200849331343541/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7022819833043768245&amp;postID=4640200849331343541' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4640200849331343541'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7022819833043768245/posts/default/4640200849331343541'/><link rel='alternate' type='text/html' href='http://cheaven.blogspot.com/2007/08/c-program-for-update-time-by-1-sec.html' title='C program for update time by 1 sec'/><author><name>sekhar</name><uri>http://www.blogger.com/profile/16143409025957550227</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></entry></feed>
