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



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

Answer / 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

More C Interview Questions

Can we compile a program without main() function?

0 Answers  


How can I recover the file name given an open stream?

0 Answers  


Explain how can I convert a number to a string?

0 Answers  


How can you determine the size of an allocated portion of memory?

0 Answers   Aspire, Infogain,


what is the use of c program?

4 Answers   Synergy, Web Synergies,


What is difference between array and structure in c?

0 Answers  


What is a macro, and explain how do you use it?

0 Answers  


how to print this pyramid * * * * * * * * * * * * *

2 Answers  


Explain how can you avoid including a header more than once?

0 Answers  


How do you print an address?

0 Answers   TCS,


How are strings stored in c?

0 Answers  


What does double pointer mean in c?

0 Answers  


Categories