answersLogoWhite

0

#include

#include

#include

#include

void main()

{

int i,j,k,n,add=0,size;

char c,in[20],temp[20],val[20],var[20];

FILE*fp;

clrscr();

fp=fopen("input.c","r");

c=getc(fp);

printf('\n THE INPUT FILE IS:")

while(!feof(fp))

{

{

printf("%c",c);

c=getc(fp);

}

fclose(fp);

printf("\n**************symbol table**************");

printf("\n DAta type\tName\tNo.of Elements\tSize\tAddress");

printf("************************************");

while(!feof(fp))

{

if(isalpha(c))

{

i=0;

do

{

temp[i==]=c

c=getc(fp);

}while(isalpha(c));

temp[i]='\0';

if(strcmp("int",temp)==0)

{

strcpy(val," ");

strcpy(in," ");

strcpy(var," ");

while(c!=';')

{

strcpy(val," ");

c=getc(fp);

i=0;

do

{

var[i++]=c;

c=getc(fp);

}while(isalpha(c));

var[i]='\0';

if(c=='[')

{

i=0;

c=getc(fp);

strcpy(in," ")

do

{

in[i++]=c;

c=getc(fp);

k=atoi(in);

size=size*k;

}

else

{

strcpy(in,'1');

size=2;

}

if(c=='=')

c=getc(fp);

i=0;

do

{

val[i++]=c;

c=getc(fp);

}while(c!=','&&c!=';')

val[i]='\0';

}

printf("\n%s\t\t%s\t%s\t\t%s\t%dBytes\t%d",temp,var,val,in,size,add);

add=add+size;

}

}

}

else

c=getc(fp);

}

getch();

}

User Avatar

Wiki User

∙ 16y ago
User Avatar

What else can I help you with?

Related Questions

How Implementation For-Symbol table in c?

create,insert,modify,search and display


What is the symbol for carbon in the periodic table?

The symbol for Carbon is C.


How you create table in c language?

The simplest way to create a table in C is to use a two-dimensional array.


Where placed keywords in c?

Inside the symbol table of the compiler.


What does c mean on the periodic table?

"c" is not a valid symbol on the periodic table for any element. The symbols on the periodic table represent the different elements, such as H for hydrogen, O for oxygen, and Na for sodium. If you are looking for an element with the symbol "c," it does not exist in the current periodic table.


C program on left factoring in compiler design?

how to create a c program for left factoring.


Which one is a system privilege a select b delete c execute d alter table e create table?

Create table


How do you write a binomial distribution table in C program?

Class&genus


What is the chemical symbol on the periodic table for Chlorine?

The symbol for chlorine in the periodic table is "Cl." It's electron configuration is [Ne] 3s2 3p5.


What is the periodic table symbol for Acetone?

Acetone does not have a specific symbol on the periodic table because it is not an element, but rather a chemical compound with the formula C₃H₆O. It consists of carbon (C), hydrogen (H), and oxygen (O) atoms. The periodic table symbols for these elements are C for carbon, H for hydrogen, and O for oxygen.


To create a copyright symbol using the AutoCorrect feature you must surround the letter c with which symbol?

Parentheses


Atomic symbol for carbon?

The symbol for carbon is 'C'. Sometimes the atomic number (always 6) is written in subscript on the left of the 'C', and the atomic mass (normally one of 12, 13, 14) is written in superscript on the left of the 'C' in nuclear sciences. Carbon does not have an equation, it has a symbol. Carbon's symbol is C.