1. Predict the output of the following program.

b
address of the string
breakinterview
compilation error

2. Predict the output of the following program.

b
address of the string
breakinterview
compilation error

3. What is a pointer pointing to a memory location that has been deleted (or freed) is called ?

Void Pointer
Null pointer
Wild Pointer
Dangling Pointer

4. What is a pointer which has not been initialized to anything (not even NULL) called?

Void Pointer
Null pointer
Wild pointer
Dangling Pointer

5. Pick the best statement for the above C program snippet.

Assigning (void *)0 to pVoid isn’t correct because memory hasn’t been allocated. That’s why no compile error but it’ll result in run time error.
Assigning (void *)0 to pVoid isn’t correct because a hard coded value (here zero i.e. 0) can’t assigned to any pointer. That’s why it’ll result in compile error.
No compile issue and no run time issue. And the size of the void pointer i.e. pVoid would equal to size of int.
sizeof() operator isn’t defined for a pointer of void type.

6. Suppose that in a C program snippet, followings statements are used.

Only i) would compile successfully and it would return size as 4.
i), ii) and iii) would compile successfully and size of each would be same i.e. 4
i), ii) and iii) would compile successfully but the size of each would be different and would be decided at run time.
ii) and iii) would result in compile error but i) would compile and result in size as 4.

7. Assume int is 4 bytes, char is 1 byte and float is 4 bytes. Also, assume that pointer size is 4 bytes

4 4 4
1 4 4
1 4 8
None of the above

8.

10
20
Compiler Error
Runtime Error

9.

10
20
Compiler Error
Runtime Error

10. Assume sizeof an integer and a pointer is 4 byte. Output?

200
4
800
80