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]#
b) 4
Explanation:
Pointer will increment by 4 bytes because it is the types of integer.
Output:
[root@localhost google]# gcc -o san san.c
[root@localhost google]# ./san
0x9b4e008
0x9b4e00c
[root@localhost google]#
c) the compiler will give the error
Explanation:
Just see the output carefully.
Output:
[root@localhost google]# gcc -o san san.c
san.c: In function 'main':
san.c:8:10: error: conflicting types for 'ptr'
san.c:7:7: note: previous declaration of 'ptr' was here
[root@localhost google]#
d) none of the mentioned
Explanation:
The memory has been allocated but we can not access rest of the memory other than 4 bytes.
Output:
[root@localhost google]# gcc -o san san.c
[root@localhost google]# ./san
[root@localhost google]#
15. The minor number range should be:
a) 0 to 15
b) 0 to 63
c) 0 to 255
d) none of the mentioned
c) 0 to 255
d) none of the mentioned
a) represnt the sub-functionalitites of the driver