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 / 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 |
Can we compile a program without main() function?
How can I recover the file name given an open stream?
Explain how can I convert a number to a string?
How can you determine the size of an allocated portion of memory?
what is the use of c program?
4 Answers Synergy, Web Synergies,
What is difference between array and structure in c?
What is a macro, and explain how do you use it?
how to print this pyramid * * * * * * * * * * * * *
Explain how can you avoid including a header more than once?
How do you print an address?
How are strings stored in c?
What does double pointer mean in c?