Question

1. [10pts] Indicate which of the following identifiers are valid C identifiers. (a) 37nights (b) give_me_1dollar...

1. [10pts] Indicate which of the following identifiers are valid C identifiers.

(a) 37nights

(b) give_me_1dollar

(c) AChristmasCarrol_Type

(d) -name_Var

(e) mainVar

(f) _temporaryVariable

(g) 3rdStreet

(h) MultiplyBy3

(i) apartment#

(j) int

0 0
Add a comment Improve this question Transcribed image text
Answer #1
(a) 37nights
Invalid, identifiers should not starts with digits

(b) give_me_1dollar
Valid

(c) AChristmasCarrol_Type
Valid

(d) -name_Var
Invalid, identifiers should not starts with -

(e) mainVar
Valid

(f) _temporaryVariable
Valid

(g) 3rdStreet
Invalid, identifiers should not starts with digits

(h) MultiplyBy3
Valid

(i) apartment#
Invalid, identifiers should not contains special characters like #

(j) int
We should not use builtin keywords for identifiers

So, valid C identifiers are
(b) give_me_1dollar
(c) AChristmasCarrol_Type
(e) mainVar
(f) _temporaryVariable
(h) MultiplyBy3
Add a comment
Know the answer?
Add Answer to:
1. [10pts] Indicate which of the following identifiers are valid C identifiers. (a) 37nights (b) give_me_1dollar...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT