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
What is difference between structure and union in c?
What is type qualifiers?
What is the significance of scope resolution operator?
Which is the best website to learn c programming?
What are the three constants used in c?
What are pointers? What are stacks and queues?
Explain what is the use of a semicolon (;) at the end of every program statement?
What is the meaning of typedef struct in c?
How do I use strcmp?
What are identifiers c?
What is the use of header?
What is nested structure in c?
How is a structure member accessed?
Why clrscr is used after variable declaration?
What is pointer in c?