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 use of parallelize in spark?
Why is sizeof () an operator and not a function?
What is the use of a conditional inclusion statement in C?
Can true be a variable name in c?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
What is non linear data structure in c?
What is function in c with example?
What is fflush() function?
Is it better to bitshift a value than to multiply by 2?
When can a far pointer be used?
How is a null pointer different from a dangling pointer?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
What is a program?
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
What is #include stdio h?