![](https://csdnimg.cn/release/download_crawler_static/1459150/bg4.jpg)
If a list is circular, at some point pointer2 will wrap around and be
either at the item just before pointer1, or the item before that. Either
way, its either 1 or 2 jumps until they meet.
"union" Data Type What is the output of the following program? Why?
#include
main() {
typedef union {
int a;
char b[10];
float c;
}
Union;
Union x,y = {100};
x.a = 50;
strcpy(x.b,"hello");
x.c = 21.50;
printf("Union x : %d %s %f n",x.a,x.b,x.c);
printf("Union y : %d %s %f n",y.a,y.b,y.c);
}
What does static variable mean?
there are 3 main uses for the static.
1. If you declare within a function:
It retains the value between function calls
2.If it is declared for a function name:
By default function is extern..so it will be visible from other files if the
function declaration is as static..it is invisible for the outer files
3. Static for global variables:
By default we can use the global variables from outside files If it is
static global..that variable is limited to with in the file
Advantages of a macro over a function?
Macro gets to see the Compilation environment, so it can expand __
__TIME__ __FILE__ #defines. It is expanded by the preprocessor.
Visit http://TechPreparation.com for more Interview Questions with Answers Page 4