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 the function of this pointer?
What is the use of function overloading in C?
Why do we use & in c?
What is volatile keyword in c?
What is the use of static variable in c?
Explain about block scope in c?
Is python a c language?
What are enumerated types?
Why doesnt this code work?
What is a c token and types of c tokens?
c program for searching a student details among 10 student details
What functions are used in dynamic memory allocation in c?
What is the use of #define preprocessor in c?
Describe how arrays can be passed to a user defined function
What are the advantages of using linked list for tree construction?