Nested micro

67 %
33 %
Information about Nested micro
Software

Published on October 9, 2014

Author: ShubhamShah001

Source: slideshare.net

Description

Nested Marco presentation

1. BY Sagar Nadgoda & Shraddha Rathor

2.  Macro having arguments  Every time whenever the macro name is encountered the arguments are replaced by the actually arguments from the program.  Macro name within another macro is called Nesting of macro.  The called macro is “Inner macro”.  The calling macro is “Outer macro”.

3. #include<stdio.h> #define d 5 #define a 20+b+d #define b c+3 #define c 50 void main() { int result; result=a+b+10+d; printf("result=",result); getch(); }

4. #include<stdio.h> #include<conio.h> #include<string.h> #include<ctype.h> struct node { char name[10]; char value[20]; struct node *next; }; struct node *start;

5. void addnode(char n[],char v[]) { struct node *temp,*nn; nn=(struct node *)malloc(sizeof(struct node)); strcpy(nn->name,n); strcpy(nn->value,v); nn->next=NULL; if(start==NULL) start=nn; else { temp=start; while(temp->next) { temp=temp->next; } temp->next=nn; } }

6. void final() { struct node *temp,*p; char string[80]; int i,j,k,l; temp=start; while(temp) { p=start; while(p) { if(strstr(temp->value,p->name)) { strcpy(string,""); k=strstr(temp->value,p->name)-(temp->value); printf("%d",k); for(i=0;i<k;i++) { string[i]=temp->value[i]; }

7. string[i]=0; strcat(string,p->value); l=strlen(p->value); for(j=i+strlen(p->name);temp->value[j];j++) { string[i+l]=temp->value[j]; i++; } string[i+l]=0; strcpy(temp->value,string); } p=p->next; } temp=temp->next; } }

8. void main() { FILE *fp,*ft; char string[81],str[50],name[10],value[20],s; int i,j,k,l,flag1,flag2,flag3; struct node *temp; clrscr(); start=NULL; fp=fopen("nest.txt","r+"); rewind(fp); printf("////tsource filet/////n"); while(!feof(fp)) { fgets(str,80,fp); printf("%s",str); } rewind(fp);

9. while(!feof(fp)) { fscanf(fp,"%s",str); if(!(strcmp(str,"#define"))) { fscanf(fp,"%s",name); fscanf(fp,"%s",value); addnode(name,value); } } printf("nn///tTable contentst///n"); temp=start; while(temp) { printf("%st%sn",temp->name,temp->value); temp=temp->next; }

10. final(); printf("nn///tFinal Table contentst///n"); temp=start; while(temp) { printf("%st%sn",temp->name,temp->value); temp=temp->next; } fclose(ft); fclose(fp); getch(); }

Add a comment

Related presentations

Speaker: Matt Stine Developing for the Cloud Track Marc Andressen has famou...

This presentation explains how to develop a Web API in Java using (JAX-RS or Restl...

1 App,

1 App,

November 10, 2014

How to bring innovation to your organization by streamlining the deployment proces...

Cisco Call-control solutions can handle voice, video and data

Nathan Sharp of Siemens Energy recently spoke at the SAP Project Management in Atl...

Related pages

WPF Nested User Controls and MVVM (esp. Caliburn.Micro ...

I’m taking a lot of worry selecting an MVVM framework to convert to. One of the major considerations is support for User Controls and nested user ...
Read more

c# - Caliburn.Micro nested ViewModels best practice ...

This is a pretty long question, so please bear with me. Currently I am developing a small tool intended to help me keep track of the myriad of characters ...
Read more

Caliburn.Micro · Xaml made easy

Thomas Ibel - Portable king, single handedly moved Caliburn.Micro into the new era of Portable Class libraries and set the foundation for the future.
Read more

Documentation · Caliburn.Micro

Caliburn.Micro Xaml made easy. Documentation. Getting Started Introduction; Obtain and Build the Code; Nuget; Cheat Sheet; Migrating to 2.0.0; Soup to Nuts
Read more

Caliburn-Micro/Caliburn.Micro · GitHub

Caliburn.Micro - A small, yet powerful framework, designed for building applications across all XAML platforms. Its strong support for MV* patterns will ...
Read more

Caliburn.Micro - GitHub · Where software is built

Caliburn.Micro. A small, yet powerful framework, designed for building applications across all XAML platforms. Its strong support for MV* patterns will ...
Read more

macro, nested, return - FreeMarker Manual

nested. The nested directive executes the template fragment between the start-tag and end-tags of the user-defined directive.
Read more

AMD-V™ Nested Paging

WHITE PAPER AMD-V™ Nested Paging Advanced Micro Devices, Inc. Executive Summary Operating systems use processor paging to isolate the address space
Read more

MicroStation – Nested References - Welcome to the ...

MicroStation – Nested References . 6. In the Import Saved Views dialog, select all the desired saved views, and click OK. Creating the Sheet File
Read more