| From : cppgm.blogspot.com
Not yet published.
#include #include #include #define lines_in_program 9 void print(char *p,int loc,int len,char ra) {printf("%s\t%d\t%d\t%c\n",p,loc,len,ra);} void main() { char *p[9][4] = "PRG1","START","",""},{"","USING","*","15"}, {"","L","1","FIVE"}, {"","A","1","FOUR"}, {"","ST","1","TEMP"}, {"FOUR","DC","F'4'",""}, {"FIVE","DC","F'5'",""}, {"TEMP","DS","1F",""}, {"","END","",""; int i,j=0,location_counter=0; clrscr(); for (i=0;i< 9;i++) { for(j=0;j< 4;j++) printf("%s\t",p[i][j]); printf("\n... Read Full Story
| From : cppgm.blogspot.com
Not yet published.
#include #include #include void main() { char *code[9][4]={ {"PRG1","START","",""}, {"","USING","*","15"}, {"","L","",""}, {"","A","",""}, {"","ST","",""}, {"FOUR","DC","F",""}, {"FIVE","DC","F",""}, {"TEMP","DS","1F",""}, {"","END","",""} }; char av[2],avail[15]={'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'}; int i,j,k,count[3],lc[9]={0,0,0,0,0,0,0,0,0},loc=0; clrscr(); printf("----------------------------------------------------\n"); printf("LABEL\t\tOPCODE\n"); printf... Read Full Story
| From : cppgm.blogspot.com
Not yet published.
/* TO IMPLEMENT LEXICAL ANALIZER IN C */ #include #include void main() { int i,j,lc; char *a[9][4]={"PRG","START" ," " ," ", " " ,"USING" ,"*" ,"15", " ","L","1","FIVE", " ","A","1","FOUR", " ","ST","1","TEMP", "FOUR ","DC","F","4", "FIVE","DC","F","5", "TEMP","DS","1","F", " " ,"END"," "," ", }; clrscr(); printf("\n \t\t LEXICAL ANALIZER \n"); for(i=0;i< 9;i++) { for(j=0;j< 4;j++) { if(isalpha(*a[i][j])) printf("\n STRING : %s",a[i][j]); if(isdigit(*a[i][j])) printf("\n DIGIT : %s",a[i][j... Read Full Story
| From : singtip.blogspot.com
Not yet published.
If you wish to have a professional shared hosting quality in a free hosting package, come and host with 000webhost.com and experience the best service you can get absolutely free. Founded in December 2006, 000webhost.com has a trusted free hosting members base of over 60,000 members and still counting! Offering professional quality hosting, support, uptime and reliability, we have a great community of webmasters, you'd love to be a part of! I have been using it for sometime now and had found... Read Full Story
| From : cppgm.blogspot.com
Not yet published.
If you wish to have a professional shared hosting quality in a free hosting package, come and host with 000webhost.com and experience the best service you can get absolutely free. Founded in December 2006, 000webhost.com has a trusted free hosting members base of over 60,000 members and still counting! Offering professional quality hosting, support, uptime and reliability, we have a great community of webmasters, you'd love to be a part of! I have been using it for sometime now and had found... Read Full Story
| From : cppgm.blogspot.com
Published to C and C++ Programs
/* C program to display a diamond using arrays */ #include< iostream.h> #include< conio.h> void main() { int i,j; clrscr(); int no; cout< < "Enter A Value"; cin>>no; for(i=no;i>=1;i--) { cout< < endl; for(int k=1;k< =i;k++) cout< < " "; for(j=i;j< =no;j++) cout< < "*"; for(j=i;j< no;j++) cout< < "*"; } //SECOND PART for(i=no;i>=1;i--) { cout< < endl; cout< < " "; for(int k=no;k>=i;k--) cout<<" "; for(j=i-1;j>=1;j--) cout< < "*"; for(j=i-1;j>1;j--) cout<<"*"; } getch... Read Full Story
| From : cppgm.blogspot.com
Published to C and C++ Programs
/* Program for inerchanging two numbers demonstrating Call By Value in C */ #include< stdio.h> #include< conio.h> void swap(int *,int *); void main() { int x,y; x=15;y=20; clrscr(); printf("x=%d,y=%d\n",x,y); swap(&x;,&y;); //printf("\n%x %x",&x;,&y;); printf("\n after interchanging x=%d,y=%d\n",x,y); getch(); } void swap(int *u,int *v) { int temp; temp=*u; *u=*v; *v=temp; return; } Read Full Story
| From : cppgm.blogspot.com
Published to C and C++ Programs
/* Program on interchanging two numbers demonstrating Call By Reference in C*/ #include< stdio.h> #include< conio.h> void main() { int x,y; x=15;y=20; clrscr(); printf("x=%d,y=%d\n",x,y); swap(x,y); printf("\n after interchanging x=%d,y=%d\n",x,y); getch(); } swap(int u,int v) { int temp; temp=u; u=v; v=temp; return; } Read Full Story
| From : cppgm.blogspot.com
Published to C and C++ Programs
/* Example of pointers in C. Thsi program uses a function to modify a string using pointers */ #include< stdio.h> #include< conio.h> void main() { void getstr(char *ptr_str,int *ptr_int); int var=5; char *pstr="lionel"; clrscr(); getstr(pstr,&var;); printf("The value of var after modification using pointer in a function is %d,var"); } void getstr (char *ptr_str,int *ptr_int) { printf("%s\n",ptr_str); *ptr_int=6; getch(); } Read Full Story
| From : cppgm.blogspot.com
Published to C and C++ Programs
/* C program to input and display a 2-d array*/ #include< stdio.h> #include< conio.h> void main() { int num[3][3],i,j; clrscr(); for(i=0;i< 3;i++) { for(j=0;j< 3;j++) { scanf("%d",#[i][j]); } } for(i=0;i< 3;i++) { for(j=0;j< 3;j++) { printf("\n%d",num[i][j]); } printf("\n"); } getch(); } Read Full Story

