13-03-2015, 08:51 AM
In this case :
1. int *ptr ; // Is this compliant or non compliant
2. void foo()
3. {
4. /* Do Something. */
5. }
Global variables are initialized to 0 by default.
This means ptr is initialized to 0 automatically by compiler.
Ques : Is line 1 compliant or non compliant to Rule 11.9.
Does this rule also enforce initializing ptr to NULL for global pointers. ?
1. int *ptr ; // Is this compliant or non compliant
2. void foo()
3. {
4. /* Do Something. */
5. }
Global variables are initialized to 0 by default.
This means ptr is initialized to 0 automatically by compiler.
Ques : Is line 1 compliant or non compliant to Rule 11.9.
Does this rule also enforce initializing ptr to NULL for global pointers. ?
<t></t>