Pending
Written on
-
Not yet published to a wikizine
From: cppgm.blogspot.com
#include#include#include#define lines_in_program 9void 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{ for(j=0;j printf("%s\t",p[i][j]); printf("\n");}printf("\n\n\n\n Symbol "... Read Full Story
Pending
Written on
-
Not yet published to a wikizine
From: cppgm.blogspot.com
#include#include#includevoid 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\... Read Full Story
Pending
Written on
-
Not yet published to a wikizine
From: cppgm.blogspot.com
/* TO IMPLEMENT LEXICAL ANALIZER IN C */#include#includevoid 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{ for(j=0;j { if(isalpha(*a[i][j])) printf("\n STRING : %s",a[i][j]); if(isdigit(*a[i][j])) printf("\n DIGIT : %s",a[i... Read Full Story
Pending
Written on
-
Not yet published to a wikizine
From: singtip.blogspot.com
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 foun... Read Full Story
Pending
Written on
-
Not yet published to a wikizine
From: cppgm.blogspot.com
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 foun... Read Full Story
Written on
-
Published to C and C++ Programs
From: cppgm.blogspot.com
/* 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 PARTfor(i=no;i>=1;i--){cout< < endl;cout< < " ";for(int k=no;k>=i;... Read Full Story
Written on
-
Published to C and C++ Programs
From: cppgm.blogspot.com
/* 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
Written on
-
Published to C and C++ Programs
From: cppgm.blogspot.com
/* 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
Written on
-
Published to C and C++ Programs
From: cppgm.blogspot.com
/* 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
Written on
-
Published to C and C++ Programs
From: cppgm.blogspot.com
/* 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
