⟩ Which command generates possible completions for string according to the and write it to standard output? a) compgen b) complete c) continue d) none of the mentioned
a) compgen
a) compgen
What is the output of this program? #include<stdio.h> #inlcude<stdlib.h> int main() { int *ptr; double *ptr; printf("%dn",sizeof(ptr)); return 0; } a) 4 b) 8 c) the compiler will give the error d) segmentaion fault
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 mentioned
Which 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 mentioned
What 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 fault
Tell 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 mentioned
What 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 mentioned
This 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 mentioned
Do 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 mentioned
The 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