Computer Science, asked by areogroup105, 3 days ago

Which of the following are invalid constants? Give reasons: 1000 -147.45 (0) "Rs. 99 (d) 5B (e) "INDIA" the following​

Answers

Answered by XxMissInactivexX
0

Answer:

d. 5B

hope

it

helps

. you

mate

Answered by ImpressAgreeable4985
2

c. 5B is correct answer

Explanation:

Types of constant in C language:

Integer constants  : 1000, 345, -678

Floating or real point constants  : 23.567, 78.98

Octal and Hexadecimal constants  : 034, 0x78

Character constants  : 'A' , 'c'

String constants  : "INDIA" , "ab45", '56d"

Backslash character constants

The following options are given:

a.  1000   is Integer constant

b. -147.45  is floating point constant

c.  5B  is invalid because it is neither integer nor string constant.A string is always written within double quotes("").

d. "INDIA" is string constant  

e. "Rs. 99" is string constant  

Similar questions