Storage Classes
- calloc() initialize memory with all bits set to zero.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
True
- What if size is zero in the following C statement?
realloc(ptr, size)
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
Free the memory pointed to by ptr
- Which of the following storage class supports char data type?
-
View Hint View Answer Discuss in Forum
char data type is supported by all storage classes i.e. auto, register and static.
Correct Option: D
char data type is supported by all storage classes i.e. auto, register and static.
- What will be the output of the program:-
extern int i = 5; main() ( int i=7; printf("%d",i); }
-
View Hint View Answer Discuss in Forum
variable declared with extern keyword has scope throughout the file, it is a global variable.
variable declared within the function is local to the function in which it is declared.Correct Option: C
printf function prints value of i, which is local to the function in which it is declared.