• Register
0 votes
71 views

Problem:

Which of the following is NOT a rule that must be followed when naming identifiers?
A. Identifiers for constants should use an underscore between words.
B. Identifiers should use periods to separate words.
C. Identifiers should list the data type at the end of the name.
D. Identifiers can contain spaces.

5 3 2
7,520 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution:

Identifiers can contain spaces.

Explanation:

There are some rules for naming correctly of your identifier,  you have to follow for naming identifiers: The first character of the identifier must be a letter of the alphabet (upper or lowercase) or an underscore ('_'). The rest of the identifier name can consist of letters (upper or lowercase), underscores ('_') or digits (0-9). It should start with a letter or with an underscore symbol ( _) but not with a digit. ... Thus, float or double, and int are invalid identifiers. Example: 1abc is the incorrect syntax of the identifier.

6 4 2
14,580 points

Related questions

0 votes
1 answer 43 views
43 views
Problem; valid c++ identifiers
asked Feb 6 kaash_kashi 1.2k points
0 votes
1 answer 13 views
13 views
Problem: Hi there! I just completed a course on Data Structures and Algorithms in Java and I was attempting an online quiz for the subject when I came across the following question: Which of the following is not a way of representing algorithms? A. Programming ... to a detailed answer in easy words so that I can understand the difference between all the options and the correct answer. Thanks!
asked Feb 20 Code Learner 6k points
0 votes
2 answers 269 views
269 views
Problem: Which of the following is not a valid C++ identifier?
asked Mar 9, 2020 ArifulIslam 7.5k points
0 votes
1 answer 44 views
44 views
Problem: Hello! I just started learning Java. I am trying to figure out the differences in naming conventions for variables and constants in Java. I declared following variables and I want to know which of these are constants? int Const = 4; float HEIGHT = 3.4; bool True = true;
asked Nov 29, 2020 Code Learner 6k points
0 votes
0 answers 34 views
34 views
Problem: Which one of the following would contain the translated Java byte code for a program named Demo? A) Demo.java B) Demo.code C) Demo.class D) Demo.byte
asked Jul 23, 2020 conner 1.5k points
–1 vote
2 answers 197 views
197 views
Problem: Which of the following is NOT true about static methods? They are created by placing the key word static after the access specifier in the method header. They are called from an instance of the class. They are often used to create utility classes that perform ... no need to collect and store data. It is not necessary for an instance of the class to be created to execute the method.
asked Apr 18, 2020 ArifulIslam 7.5k points
0 votes
2 answers 249 views
249 views
Problem: Which of the following is a valid C++ array definition? A) int array[0]; B) float $payments[10]; C) void numbers[5]; D) int array[10]; E) None of these
asked Apr 18, 2020 ArifulIslam 7.5k points
0 votes
1 answer 48 views
48 views
Problem: What will be the value of x after the following code is executed? int x = 10, y = 20; while (y < 100) { x += y; } A) 90 B) 110 C) 210 D) This is an infinite loop.
asked Mar 9, 2020 ArifulIslam 7.5k points
1 vote
1 answer 70 views
70 views
Problem: Is a programming language that can be used to create a wide range of windows applications?
asked Mar 23, 2020 ArifulIslam 7.5k points