Which of the following variable names for data items are not syntactically correct?

  1. CIBER-CITY

  2. -NW-OF-FOOD

  3. TOTAL-NO-OF-LINES-PER-PAGE

  4. PHONE NUMBER

  5. INDEX


Correct Option: B,D,E

AI Explanation

To determine which of the following variable names for data items are not syntactically correct, let's go through each option:

A. CIBER-CITY - This option is syntactically correct. Variable names can contain letters, numbers, and underscores, but cannot start with a number.

B. -NW-OF-FOOD - This option is not syntactically correct. Variable names cannot start with a hyphen or any special characters.

C. TOTAL-NO-OF-LINES-PER-PAGE - This option is syntactically correct. Variable names can contain underscores to separate words.

D. PHONE NUMBER - This option is not syntactically correct. Variable names cannot contain whitespace or spaces.

E. INDEX - This option is syntactically correct. Variable names can be single words and can contain letters, numbers, and underscores.

Therefore, the variable names that are not syntactically correct are B. -NW-OF-FOOD, D. PHONE NUMBER, and E. INDEX.

Find more quizzes: