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


Please Help Members By Posting Answers For Below Questions

In c programming, explain how do you insert quote characters (? And ?) Into the output screen?

995


What does p mean in physics?

806


please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................

1756


Write a function that will take in a phone number and output all possible alphabetical combinations

813


What is the best way of making my program efficient?

763


What is nested structure?

774


What is page thrashing?

844


Do string constants represent numerical values?

1138


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

1988


What is void main () in c?

942


What is extern variable in c with example?

758


What are pointers? What are stacks and queues?

778


Why we write conio h in c?

758


What are the advantages of c preprocessor?

978


write a program to find the given number is prime or not

4280