SlideShare a Scribd company logo
BY
Sagar Nadgoda
&
Shraddha Rathor
 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”.
#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();
}
#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;
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;
}
}
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];
}
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;
}
}
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);
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;
}
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();
}
Nested micro
Nested micro
Nested micro

More Related Content

What's hot (19)

PDF
C programs
Vikram Nandini
 
PDF
Implementing string
mohamed sikander
 
PDF
Operator overloading
mohamed sikander
 
PPTX
Chapter 7 functions (c)
hhliu
 
PDF
Rainer Grimm, “Functional Programming in C++11”
Platonov Sergey
 
PDF
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 5 of 5 by...
ssuserd6b1fd
 
PDF
Understanding storage class using nm
mohamed sikander
 
PDF
Modern C++ Concurrency API
Seok-joon Yun
 
PDF
C program
Komal Singh
 
PDF
C language sample test
Sompal Duhan
 
PDF
Notes for C++ Programming / Object Oriented C++ Programming for MCA, BCA and ...
ssuserd6b1fd
 
TXT
Advance C++notes
Rajiv Gupta
 
PDF
c programming
Arun Umrao
 
PPT
Advance features of C++
vidyamittal
 
PDF
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 4 of 5 by...
ssuserd6b1fd
 
PDF
C++ Programming - 1st Study
Chris Ohk
 
DOC
C tech questions
vijay00791
 
PDF
Bind me if you can
Ovidiu Farauanu
 
PDF
Data struture lab
krishnamurthy Murthy.Tt
 
C programs
Vikram Nandini
 
Implementing string
mohamed sikander
 
Operator overloading
mohamed sikander
 
Chapter 7 functions (c)
hhliu
 
Rainer Grimm, “Functional Programming in C++11”
Platonov Sergey
 
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 5 of 5 by...
ssuserd6b1fd
 
Understanding storage class using nm
mohamed sikander
 
Modern C++ Concurrency API
Seok-joon Yun
 
C program
Komal Singh
 
C language sample test
Sompal Duhan
 
Notes for C++ Programming / Object Oriented C++ Programming for MCA, BCA and ...
ssuserd6b1fd
 
Advance C++notes
Rajiv Gupta
 
c programming
Arun Umrao
 
Advance features of C++
vidyamittal
 
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 4 of 5 by...
ssuserd6b1fd
 
C++ Programming - 1st Study
Chris Ohk
 
C tech questions
vijay00791
 
Bind me if you can
Ovidiu Farauanu
 
Data struture lab
krishnamurthy Murthy.Tt
 

Viewers also liked (20)

PDF
AOSP에 컨트리뷰션 하기 dev festx korea 2012 presentation
SeongJae Park
 
PPTX
sCode optimization
Satyamevjayte Haxor
 
PDF
Porting golang development environment developed with golang
SeongJae Park
 
PPT
Assembler
Vaibhav Bajaj
 
PPTX
Patterns
Satyamevjayte Haxor
 
PPT
Unit 3 assembler and processor
Abha Damani
 
DOC
Use case diagrams
Mir Majid
 
PPS
Lessons from life_2
Mir Majid
 
PDF
Let the contribution begin
SeongJae Park
 
PDF
Let the contribution begin (EST futures)
SeongJae Park
 
PPTX
Keyword Presentation
Satyamevjayte Haxor
 
PDF
Git inter-snapshot public
SeongJae Park
 
PDF
Deep dark side of git - prologue
SeongJae Park
 
PDF
gcma: guaranteed contiguous memory allocator
SeongJae Park
 
PDF
(Live) build and run golang web server on android.avi
SeongJae Park
 
PDF
DO YOU WANT TO USE A VCS
SeongJae Park
 
PDF
Class Outlier Mining
Motaz Saad
 
PDF
An introduction to_golang.avi
SeongJae Park
 
AOSP에 컨트리뷰션 하기 dev festx korea 2012 presentation
SeongJae Park
 
sCode optimization
Satyamevjayte Haxor
 
Porting golang development environment developed with golang
SeongJae Park
 
Assembler
Vaibhav Bajaj
 
Unit 3 assembler and processor
Abha Damani
 
Use case diagrams
Mir Majid
 
Lessons from life_2
Mir Majid
 
Let the contribution begin
SeongJae Park
 
Let the contribution begin (EST futures)
SeongJae Park
 
Keyword Presentation
Satyamevjayte Haxor
 
Git inter-snapshot public
SeongJae Park
 
Deep dark side of git - prologue
SeongJae Park
 
gcma: guaranteed contiguous memory allocator
SeongJae Park
 
(Live) build and run golang web server on android.avi
SeongJae Park
 
DO YOU WANT TO USE A VCS
SeongJae Park
 
Class Outlier Mining
Motaz Saad
 
An introduction to_golang.avi
SeongJae Park
 
Ad

Similar to Nested micro (20)

PPTX
1614745770521_vivek macros.pptx
VivekSaini87
 
PPTX
Presentation on macros and macro processor
Kuldeep Pathak
 
PPTX
SPOS UNIT 2 MACRO NOTES SPOS UNIT 2 MACRO NOTESSPOS UNIT 2 MACRO NOTESSPOS...
22510707dypit
 
PPTX
chapter-6 slide.pptx
cricketreview
 
PPT
Ss4
Jaya Chavan
 
PDF
Handout#05
Sunita Milind Dol
 
PPT
functions in cfunctions in cfunctions in c
MrsMinuMeeraM
 
PPT
Macros in system programing
Brijesh__patel
 
PPTX
CSE240 Macros and Preprocessing
Garrett Gutierrez
 
PDF
Preprocessor
Learn By Watch
 
PDF
Module 05 Preprocessor and Macros in C
Tushar B Kute
 
PPTX
Introduction to c
Sayed Ahmed
 
PPTX
1 introduction to c program
NishmaNJ
 
PDF
C programming
Samsil Arefin
 
PPT
11 functions
Rohit Shrivastava
 
PPTX
Unit ii-111206004636-phpapp01
riddhi viradiya
 
PPTX
System Programming Unit II
Manoj Patil
 
PPTX
System Programming Unit II
Manoj Patil
 
PPTX
C concepts and programming examples for beginners
SHAAMILIRAJAKUMAR1
 
PDF
Embedded SW Interview Questions
PiTechnologies
 
1614745770521_vivek macros.pptx
VivekSaini87
 
Presentation on macros and macro processor
Kuldeep Pathak
 
SPOS UNIT 2 MACRO NOTES SPOS UNIT 2 MACRO NOTESSPOS UNIT 2 MACRO NOTESSPOS...
22510707dypit
 
chapter-6 slide.pptx
cricketreview
 
Handout#05
Sunita Milind Dol
 
functions in cfunctions in cfunctions in c
MrsMinuMeeraM
 
Macros in system programing
Brijesh__patel
 
CSE240 Macros and Preprocessing
Garrett Gutierrez
 
Preprocessor
Learn By Watch
 
Module 05 Preprocessor and Macros in C
Tushar B Kute
 
Introduction to c
Sayed Ahmed
 
1 introduction to c program
NishmaNJ
 
C programming
Samsil Arefin
 
11 functions
Rohit Shrivastava
 
Unit ii-111206004636-phpapp01
riddhi viradiya
 
System Programming Unit II
Manoj Patil
 
System Programming Unit II
Manoj Patil
 
C concepts and programming examples for beginners
SHAAMILIRAJAKUMAR1
 
Embedded SW Interview Questions
PiTechnologies
 
Ad

More from Satyamevjayte Haxor (14)

DOCX
Processes and threads
Satyamevjayte Haxor
 
PPT
Uml class Diagram
Satyamevjayte Haxor
 
DOCX
Uml Common Mechanism
Satyamevjayte Haxor
 
PPTX
Types and roles
Satyamevjayte Haxor
 
DOCX
States machine
Satyamevjayte Haxor
 
PPTX
What is symbol table?
Satyamevjayte Haxor
 
PPTX
Lexical
Satyamevjayte Haxor
 
PPTX
Single Pass Assembler
Satyamevjayte Haxor
 
PPTX
Multiplier control unit
Satyamevjayte Haxor
 
PPTX
Control unit design
Satyamevjayte Haxor
 
PPTX
Direct linking loaders
Satyamevjayte Haxor
 
PPTX
Two pass Assembler
Satyamevjayte Haxor
 
PPTX
Compilers
Satyamevjayte Haxor
 
PPTX
Linking in MS-Dos System
Satyamevjayte Haxor
 
Processes and threads
Satyamevjayte Haxor
 
Uml class Diagram
Satyamevjayte Haxor
 
Uml Common Mechanism
Satyamevjayte Haxor
 
Types and roles
Satyamevjayte Haxor
 
States machine
Satyamevjayte Haxor
 
What is symbol table?
Satyamevjayte Haxor
 
Single Pass Assembler
Satyamevjayte Haxor
 
Multiplier control unit
Satyamevjayte Haxor
 
Control unit design
Satyamevjayte Haxor
 
Direct linking loaders
Satyamevjayte Haxor
 
Two pass Assembler
Satyamevjayte Haxor
 
Linking in MS-Dos System
Satyamevjayte Haxor
 

Recently uploaded (20)

PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PPTX
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
PDF
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
PDF
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
 
PPTX
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
PPTX
UI5con_2025_Accessibility_Ever_Evolving_
gerganakremenska1
 
PPTX
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
PDF
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PPTX
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
PDF
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PPTX
Transforming Insights: How Generative AI is Revolutionizing Data Analytics
LetsAI Solutions
 
PDF
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
Dipole Tech Innovations – Global IT Solutions for Business Growth
dipoletechi3
 
PDF
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
PPTX
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
prodad heroglyph crack 2.0.214.2 Full Free Download
cracked shares
 
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
 
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
UI5con_2025_Accessibility_Ever_Evolving_
gerganakremenska1
 
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
Optimizing Tiered Storage for Low-Latency Real-Time Analytics at AI Scale
Alluxio, Inc.
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
Transforming Insights: How Generative AI is Revolutionizing Data Analytics
LetsAI Solutions
 
AI Prompts Cheat Code prompt engineering
Avijit Kumar Roy
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
Dipole Tech Innovations – Global IT Solutions for Business Growth
dipoletechi3
 
Everything you need to know about pricing & licensing Microsoft 365 Copilot f...
Q-Advise
 
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 

Nested micro