⟩ What is the output of this program? #!/bin/bash for i in 2 3 7 do echo "ggl" done exit 0 a) 'ggl' will print 3 times b) nothing will print c) program will generate an error message d) none of the mentioned
a) 'ggl' will print 3 times
a) 'ggl' will print 3 times
In linux kernel 2.1, the minor numbers were used to a) represent the sub-functionalitites of the driver b) identify the driver c) represent the device files d) none of the mentioned
The minor number range should be a) 0 to 15 b) 0 to 63 c) 0 to 255 d) none of the mentioned
Which one of the following is not true? a) dynamic allocation of major numbers is not possible b) major number can not be shared among drivers c) both (a) and (b) d) none of the mentioned
What is the output of this program? #include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int ptr; ptr = (int)malloc(sizeof(int)*10); return 0; } a) syntax error b) segmentaion fault c) run time error d) none of the mentioned
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