Professional Device Drivers Interview Questions & Answers:
b) major number
c) 256 character drivers and 256 block drivers at the same time
b) number of device file
b) segmentation fault
Explanation:
Memory must be allocated to pointer "ptr".
Output:
[root@localhost google]# gcc -o san san.c
[root@localhost google]# ./san
Segmentation fault (core dumped)
[root@localhost google]#
c) 40
Explanation:
If the first argument of realloc() is NULL, then it behaves just like malloc().
b) segmentation fault
Explanation:
Memory must be allocated to pointer "ptr".
Output:
[root@localhost google]# gcc -o san san.c
[root@localhost google]# ./san
Segmentation fault (core dumped)
[root@localhost google]#
c) 115
Explanation:
This program will print the equivalent decimal value at location pointed by "ptr".
Output:
[root@localhost google]# gcc -o san san.c
[root@localhost google]# ./san
115
[root@localhost google]#
d) none of the mentioned
Explanation:
This program will print two different values.
Output:
[root@localhost google]# gcc -o san san.c
[root@localhost google]# ./san
0x4a77cff4
0x980c008
[root@localhost google]#
https://InterviewQuestionsAnswers.ORG.