647 views
1 votes
1 votes
How tokens are assigned for a string having escape sequence in C lexical phase

Eg..

printf ("this\" is a string\"");

and what for

printf ("this is""a string");

1 Answer

Best answer
0 votes
0 votes
Token 1: this" is a string"

Token 2: this isa string

Adjacent string constants are concatenated.

Related questions

1 votes
1 votes
1 answer
1
1 votes
1 votes
0 answers
2
goluabhinan asked Sep 16, 2018
4,219 views
Whether a given pattern constitutes a token or not(a) depends on the source language(b) depends on the target language(c) depends on the compiler(d) none of the above com...
0 votes
0 votes
2 answers
3
all mix asked Jun 5, 2018
378 views
if i write $\text{printf("norma\bl")}$,then output is $norml$,but when i write $\text{printf("normal\b")}$,then output is $normal$..whycan anyone explain concept of $\tex...
2 votes
2 votes
0 answers
4
Aradhana Singh asked Aug 26, 2016
1,602 views
how many characters does an escape sequence (\On , \Hn ,\n ,\f) in C++ consumea)1 b)3 c)2 d)none