A computer system supports a logical address space of 232 bytes. It uses two-level hierarchical paging with a page size of 4096 bytes. A logical address is divided into a b-bit index to the outer page table, an offset within the page of the inner page table, and an offset within the desired page. Each entry of the inner page table uses eight bytes. All the pages in the system have the same size. The value of $b$ is _________ . (Answer in integer)
Consider the following C program :
#include <stdio.h>
void stringcopy(char *, char *);
int main( ) {
char a[30] = "@#Hello world!";
stringcopy(a,a+2);
printf("%s\n", a);
return 0;
}
void sringcopy(char *s, char *t) {
while(*t)
*st++ = *t++;
}
Which ONE of the following will be the output of the program?
int x = 126, y = 105;
do{
if(x > y) x = x - y;
else y = y - x;
}while(x!=y);
printf('%d", x);
The output of the given C code segment is __________. (Answer in integer)
Consider the following C program :
#include <stdio.h>
int main( ) {
int a;
int arr[5]={30,50,10};
int *ptr;
ptr = &arr[0] + 1;
a = *ptr;
(*ptr)++;
ptr++;
printf("%d",a + (*ptr) + arr[1]);
return 0;
}
The output of the above program is _________. (Answer in integer)
GATE CSE Papers
All year-wise previous year question papers