⟩ Which option of the command 'cd' use the actual filesystem path for cd.. and the value of pwd? a) -l b) -L c) -p d) -P
d) -P
d) -P
In this program the two printed memory locations has the difference of ___ bytes.
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *ptr;
ptr = (int*)malloc(sizeof(int)*2);
printf("%pn",ptr);
printf("%pn",ptr+1);
return 0;
}
a) 1
b) 4
c) can not be determined
d) none of the mentionedWhich one of the following in true about this program?
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char *ptr;
printf("%pn",ptr);
ptr = (char *)malloc(sizeof(char));
printf("%pn",ptr);
return 0;
}
a) this program will give segmentation fault
b) this program will print two same values
c) this program has some syntax error
d) none of the mentionedWhat is the output of this program?
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char *ptr;
ptr = (char*)malloc(sizeof(char)*11);
strcpy(ptr,"google");
printf("%dn",*ptr);
return 0;
}
a) s
b) google
c) 115
d) segmentation faultTell me what is the output of this program?
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char *ptr;
memcpy(ptr,"google",11);
printf("%sn",ptr);
return 0;
}
a) google
b) segmentation fault
c) syntax error
d) none of the mentionedWhat is the output of this program?
#include<stdio.h>
#include<stdlib.h>
int main()
{
char *ptr;
free(ptr);
return 0
}
a) this program will print nothing after execution
b) segmentation fault
c) Aborted (core dumped)
d) none of the mentionedThis program will allocate the memory of ___ bytes for pointer "ptr".
#include<stdio.h>
#include<stdlib.h>
int main()
{
int *ptr;
ptr = realloc(0,sizeof(int)*10);
return 0;
}
a) 0
b) 10
c) 40
d) none of the mentionedDo you know what is the output of this program?
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char *ptr;
memcpy(ptr,"google",11);
printf("%sn",ptr);
return 0;
}
a) google
b) segmentation fault
c) syntax error
d) none of the mentionedThe connection between the device file and device driver is based on the a) name of device file b) number of device file c) both (a) and (b) d) none of the mentioned
In linux kernel 2.4, we can have a) 256 character drivers only b) 256 block drivers only c) 256 character drivers and 256 block drivers at the same time d) none of the mentioned
The kernel identifies the driver with its a) module b) major number c) device file d) none of the mentioned