Pointers – Yes / No Questions

1. Is there any difference between the following two statements?
char *p=0;
char *t=NULL;

A. Yes
B. No

Correct Answer: B. No

2. Is this a correct way for NULL pointer assignment?
int i=0;
char *q=(char*)i;

A. Yes
B. No

Correct Answer: B. No

3. Is the NULL pointer same as an uninitialised pointer?

A. Yes
B. No

Correct Answer: B. No

4. Will the program compile in Turbo C?

Screenshot 1

A. Yes
B. No

Correct Answer: B. No

5. Will the following program give any warning on compilation in TurboC (under DOS)?

Screenshot 2

A. Yes
B. No

Correct Answer: B. No

Leave A Comment?

fourteen − three =