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 structure in c definition?
Why structure is used in c?
Not all reserved words are written in lowercase. TRUE or FALSE?
What is time null in c?
Apart from dennis ritchie who the other person who contributed in design of c language.
What is return in c programming?
What does s c mean on snapchat?
What is typedef example?
What are lookup tables in c?
What are data structures in c and how to use them?
what do you mean by enumeration constant?
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
What are the characteristics of arrays in c?
What is c system32 taskhostw exe?
What is the use of the function in c?