Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program in 'c' to find the value of p[i+1]^n.p,i,n
are arguments of a macro and n is a integer

Answer Posted / ataraxic

int data[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

#define GET(p, i, n) \
({ \
p[i+1]^n; \
})

int main(int argc, char *argv[], char *envp[])
{
int res = GET(data, 2, 1);
printf("%d\n", res);
exit(EXIT_SUCCESS);
}

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between structure and union in c?

926


What is type qualifiers?

1081


What is the significance of scope resolution operator?

1349


Which is the best website to learn c programming?

1036


What are the three constants used in c?

933


What are pointers? What are stacks and queues?

1067


Explain what is the use of a semicolon (;) at the end of every program statement?

1186


What is the meaning of typedef struct in c?

1006


How do I use strcmp?

1027


What are identifiers c?

1024


What is the use of header?

1054


What is nested structure in c?

1016


How is a structure member accessed?

1063


Why clrscr is used after variable declaration?

1625


What is pointer in c?

1143