char *str1 = "Hello; /* Statement S1 */
char *str2 = "Hello;"; /* Statement S2 */
int *str3 = "Hello"; /* Statement S3 */
Which of the following options is/are correct?
The given question involves understanding errors in C statements. Let's analyze each statement one by one:
char *str1 = "Hello;str1. However, the string is not terminated with a closing double quote. This causes a lexical error, as the lexer (lexical analyzer) will not be able to find an end to the string literal.char *str2 = "Hello;";"Hello;" to the character pointer str2. The semicolon inside the string is part of the string itself, and the statement ends properly with a semicolon outside the string. There are no lexical or syntactic errors here.int *str3 = "Hello";Now, evaluating the options, the correct answer is:
Other options are incorrect based on the analysis above. S2 does not have any errors.
Arrange the given compilation process in the correct order.
a. Linking
b. Assembling
c. Compiling
d. Pre-processing
Which of the following are applications of symbol table ?
(A) Storage allocation
(B) Checking type compatability
(C) Suppressing duplicate error messages
Choose the correct answer from the options given below:
Which ONE of the following statements is FALSE regarding the symbol table?
What is the output of a lexical analyzer?