Variable names in C, generically called identifiers, use the underscore character to mash together words to make useful names. This is called snake case. For example,                 double city_sales_tax = 0.08;                 int days_in_year_2018 = 365;                 char superman_letter = ‘s’;                 char *mothers_maden_name = “Smith”; Another way to do this is to omit the underscore but to capitalize the first letter of each word in the identifier, except for the first word. This is called camel case. For example,                 double citySalesTax = 0.08;                 int daysInYear2018 = 365;                 char supermanLetter = ‘s’;                 char *mothers_maden_name = “Smith”; These are called naming conventions. In general, you can use either in your programs, BUT you need to constantly use one or the other in your code, and avoid mixing the 2 in the same program.  Which one makes the most sense to you, and why?

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 16RQ
icon
Related questions
Question
  1. Variable names in C, generically called identifiers, use the underscore character to mash together words to make useful names. This is called snake case. For example,

                double city_sales_tax = 0.08;

                int days_in_year_2018 = 365;

                char superman_letter = ‘s’;

                char *mothers_maden_name = “Smith”;

Another way to do this is to omit the underscore but to capitalize the first letter of each word in the identifier, except for the first word. This is called camel case. For example,

                double citySalesTax = 0.08;

                int daysInYear2018 = 365;

                char supermanLetter = ‘s’;

                char *mothers_maden_name = “Smith”;

These are called naming conventions.

In general, you can use either in your programs, BUT you need to constantly use one or the other in your code, and avoid mixing the 2 in the same program. 

Which one makes the most sense to you, and why?

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT