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
Why is #define used?
Can the curly brackets { } be used to enclose a single line of code?
what is the format specifier for printing a pointer value?
Explain what are preprocessor directives?
What functions are in conio h?
What is the main difference between calloc () and malloc ()?
How do you list files in a directory?
What is the difference between if else and switchstatement
can we change the default calling convention in c if yes than how.........?
Explain what is dynamic data structure?
How can I avoid the abort, retry, fail messages?
Is that possible to add pointers to each other?
How was c created?
What is && in c programming?
What do you mean by Recursion Function?