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

1. Write a program to reverse every second word in a given sentence.

1 Answers  


why do we use pointer instead directly acessing the data?

2 Answers  


long int size a) 4 bytes b) 2 bytes c) compiler dependent d) 8 bytes

18 Answers   Acropolis, HCL, Intel, TCS,


what are bitwise shift operators?

4 Answers  


prog for 1st five prime numbers in 2^x - 1

0 Answers  


Which is the memory area not included in C program? give the reason

0 Answers   IBM, TCS,


what is the difference between global variable & static variable declared out side all the function in the file.

2 Answers  


Discuss the function of conditional operator, size of operator and comma operator with examples.

0 Answers   TCS,


int i[2], j; int *pi;i[0] = 1; i[1] = 5; pi = i; j = *pi + 1 + *(pi + 1)Value of j after execution of the above statements will be a) 7 b) 6 c) 4 d) pointer

0 Answers  


how to copy a string without using c function

5 Answers  


How variables are declared in c?

0 Answers  


main() { int i = 1; int num[] = {1,2,3,4}; num[i] = i++; printf("%d", num[i]); } what will be the output? }

22 Answers   NDS, TCS,


Categories