In which way can SAM be stored in an array?
(a) char name[]=”SAM”
(b) char name[6]={‘S’,’A’,’M’}
(c) char name[6]={“S”,”A”,”M”}
(d) char name [6]={‘S’,’A’,’M’,’\0’}
The question was asked in quiz.
This intriguing question comes from Array Reference in portion Syntax Directed Definition and Translations of Compiler