Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Which of following is/are correct variable name(s)? 3A Battery A 3 Battery Orang

ID: 3931089 • Letter: W

Question

Which of following is/are correct variable name(s)? 3A Battery A 3 Battery Orange char. Cheek all reserved word(s) in C language float break continue come visit short return switch signed unsigned print f String str = "It ia cold today | " What is the index of the acclamation point? Define a C string named firstName that stores up to 20 characters Don't initialize the C string. Given: printf("Enter fruit name:"); scanf("%s", fruitColor); printf("Enter fruit color:"); scan f("% S", fruitName); The user will type Fuji Apple (ENTER) for the fruit name and red (ENTER) for the color. What is stored in fruitColor?

Explanation / Answer

1. b, and c are correct answers. A variable name is allowed to have alphabets, numbers, and an underscore. A variable name cannot start with a number.

2. a. float, b. break, c. continue, f. short, g. return, h. switch, i. signed, j. unsigned are all reserved words in C.

3. 16 is the index of the exclamation point.

4. char firstName[20]; will define a C string named firstName that stores upto 20 characters.

5. Fuji will be stored for fruitColor.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote