1. if there are 16 memory segments of size 1MB each.,then the address should contain how many bits????
2.this is the code
char x;
for (x=0;x%26lt;=127;x++)
is this statement is true??
3.int v()
{
int m=0;
return (++m);
}
wat this function returns???
4. odd man out???
a.i=-1 b.j=1 c.*p=%26amp;i d.*q=%26amp;j
another a. %26amp;a[k] b. a+b c.*(a+b) d.k+a
5.the following is a predefined target formake
all
clean
always
distclean
none
Here are few questions asked in my interview ,but i don`t know the answer can anybody help?????????
1. You have to figure out how many bits you need to select a segment+how many bits you need for the offset within that segment
so, you need to solve for x where 2^x = 16 and for y where 2^y=1MB (I believe 1MB = 2^20). Then add x and y.
2. I imagine the question was something about whether that would work or not since you are doing what would normally be considered integer arithmetic on a variable you have declared as a char. I would suggest trying to compile it yourslef and see what happens.
3. I believe it would return 1 since it is a preincrement. Unfortunately I can't say with certainty and would recommend running it yourself.
4. Really no idea what is going on there
5. evil make (because I don't know it well enough)...the only ones I am fairly sure of are all and none.
Reply:What was the interview for?? These look more like exam questions...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment