⟩ Which of the following time stamps need not exist for a file on traditional unix file system a) Access Time b) Modification Time c) Creation Time d) Change Time
c) Creation Time
c) Creation Time
Please tell me output of this program? #include<stdio.h> #include<stdlib.h> int main() { int *ptr; ptr = (int *)calloc(1,sizeof(int)); if (ptr != 0) printf("%dn",*ptr); return 0; } a) 0 b) -1 c) garbage value d) none of the mentioned
Program given below will allocate the memory of ___ bytes for pointer "ptr". #include<stdio.h> #include<stdlib.h> int main() { int *ptr; ptr = (int*)malloc(sizeof(int)*4); ptr = realloc(ptr,sizeof(int)*2); return 0; } a) 2 b) 4 c) 8 d) none of the mentioned
In which condition this prgram will print the string "google"? #include<stdio.h> #include<stdlib.h> int main() { int *ptr; ptr = (int *)malloc(sizeof(int)*10); if (ptr == NULL) printf("googlen"); return 0; } a) if the memory could not be allocated to the pointer "ptr" b) if the memory has been allocated to the pointer "ptr" successfully c) it will never print d) none of the mentioned
What is the output of this program? #include<stdio.h> #include<stdlib.h> int main() { int ret; int *ptr; ptr = (int *)malloc(sizeof(int)*10); free(ptr); free(ptr); return 0; } a) it will print nothing b) it will give segmentaion fault c) undefined behaviour d) none of the mentioned
What is the output of this program? #include<stdio.h> #include<stdlib.h> int main() { int *ptr1; while(1){ ptr1 = malloc(1024*1024); if(ptr1 == 0) break; sleep(1); printf("googlen"); free(ptr1); } return 0; } a) it will print "google" until the process has been stopeed by any signal b) it will print nothing c) segmentation fault d) none of the mentioned
What is the output of this program? #include<stdio.h> #include<stdlib.h> int main() { int *ptr1, *ptr2; ptr1 = malloc(4); *ptr1 = 10; *ptr2 = free(ptr1); printf("%dn",*ptr2); return 0; } a) 10 b) it will print the address stored in ptr1 c) it will print the address stored in ptr2 d) it will give an error
Do you have any idea what is the output of this program? #include<stdio.h> #include<stdlib.h> int main() { int *ptr; *ptr = 10; *ptr = 20; printf("%dn",*ptr); return 0; } a) 10 b) 20 c) segmentation fault d) none of the mentioned
What is the output of this program? #include<stdio.h> int main() { int *ptr; ptr = (int *)calloc(1,sizeof(int)); *ptr = 10; printf("%dn",*ptr); return 0; } a) 0 b) -1 c) 10 d) none of the mentioned
On Linux, initrd is a file a) containing root file-system required during bootup b) Contains only scripts to be executed during bootup c) Contains root-file system and drivers required to be preloaded during bootup d) None of the above
Which of the following is not a valid run-level? a) S b) 0 c) 8 d) 1