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 / 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 |
how to use virual function in real time example
My teacher ask to make a program that can: Insert record in front Insert record at the end Insert in between Search node record Delete record in front Delete record at the end Delete record in between Using Data structure Linked List type. But I'm really confused about the codes and I can't go through. Please help Thanks in advance. Also here is my unfinished code if someone can make changes it will be more good.
what does the following code do? fn(int n,int p,int r) { static int a=p; switch(n){ case 4:a+=a*r; case 3:a+=a*r; case 2:a+=a*r; case 1:a+=a*r; } } a.computes simple interest for one year b.computes amount on compound interest for 1 to 4 years c.computes simple interest for four year d.computes compound interst for 1 year
how to get starting address of a running C program
Please write me a program to print the first 50 prime numbers (NOT between the range 1 -50)
what is level of tree if leaf node is at level 4.please explain.
what is the output for this question: main() { int i=1; printf("%d%d%d",i,i++,++i); }
Write a C program that reads a series of strings and prints only those ending in "ed"
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
How old is c programming language?
Difference between exit() and _exit() function?
prog for 1st five prime numbers in 2^x - 1