My Profile
Active Members
TodayLast 7 Days
more...
Awards & Gifts
Online Exams
Fresher Jobs
Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian
cities including Bangalore, Chennai, Hyderabad, Pune or Kochi
Resources
Find educational articles, blogs, discussion threads and other resources.
Colleges
Find details about any college in India or search for courses.
|
C Program to implement Macro Processor
Posted Date: 20 Apr 2008 Resource Type: Articles/Knowledge Sharing Category: Computer & Technology
|
Posted By: Nithya Krishna Member Level: Gold Rating: Points: 1
|
#include #include #include void main() { int l=0,z=1,i=1,flag,mno[10],k,r,p,temp,f,w=1; char pdef[10][15],mdef[10][10][15],str[15],mname[10][10]; clrscr(); printf("Enter the macros:"); while(strcmpi(gets(str),"end")!=0) { if(strstr((str),"macro")) { z=1; for(k=6;k<=strlen(str);k++) mname[w][k-6]=str[k]; l=l+1; } else if(strstr((str),"mend")) { mno[w]=z; z=1; w=w+1; l=l-l; } else if(l!=0) { strcpy(mdef[w][z],str); z=z+1; } else { strcpy(pdef[i],str); i=i+1; } } for(p=1;p { flag=0; for(r=1;r{ if(strstr(pdef[p],mname[r])) { flag=1; temp=mno[r]; for(f=1;f{ printf("\n%s",mdef[r][f],temp); } break; } } if(flag==0) printf("\n%s",pdef[p]); } getch(); }
|
Responses
|
No responses found. Be the first to respond and make money from revenue sharing program.
|
|
Watch TV Channels
|