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 |
can anyone please tell about the nested interrupts?
Is main is a keyword in c?
what will be the out put. #include<stdio.h> void main() { printf("Output:"); printf(1+"vikashpatel"); }//output: ikashpatel
how the size of an integer is decided? - is it based on processor or compiler or OS?
19 Answers HCL, JPR, Microsoft, nvidia,
What is scanf_s in c?
Explain what is a static function?
What is a 'null pointer assignment' error?
What is a constant?
What is the output of the following program #include<stdio.h> main() { int i=0; fork(); printf("%d",i++); fork(); printf("%d",i++); fork(); wait(); }
What is the return type of sizeof?
If the static variable is declared as global, will it be same as extern?
What is the purpose of 'register' keyword in c language?