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 the function of this pointer?

1350


What is the use of function overloading in C?

1179


Why do we use & in c?

1008


What is volatile keyword in c?

1039


What is the use of static variable in c?

1093


Explain about block scope in c?

1098


Is python a c language?

1020


What are enumerated types?

1199


Why doesnt this code work?

1072


What is a c token and types of c tokens?

1072


c program for searching a student details among 10 student details

2093


What functions are used in dynamic memory allocation in c?

1090


What is the use of #define preprocessor in c?

1081


Describe how arrays can be passed to a user defined function

1300


What are the advantages of using linked list for tree construction?

1104