Question

In: Computer Science

A certain programming language allows only two-character variable names. The first character must be a letter...

A certain programming language allows only two-character variable names. The first character must be a letter (upper or lower case) and the second character can be a letter (upper or lower case) or a digit. How many possible variable names are there?

Solutions

Expert Solution

So First Thing given is, it will be only two character variable name

_ _

So At the first place, We can have one from Either Upper case letters or lower case letters

So there are 26 Upper case letters and 26 Lower case letters,

Since we have to choose one from Upper case letters OR lower case letters, So for OR we use +

Hence 26 + 26 = 52

So for first place we have 52 possibilities, we can have any one letter from these 52 letters

So there are 52 ways for first place.

For second place, We can have one from either 26 upper case letters, or from 26 lower case letters, or from any digit 0-9 i.e 10 choices

Total 26 + 26 + 10= 62

So 62 ways for second digit

Now Final two character variable name will be created by

(Choosing one letter from 52 letters- 26 Upper case OR 26 Lower Case ) AND ( Choosing one letter from 26 Upper case OR 26 Lower Case or 10 digits (0-9)

=( 26 + 26 ) x (26 + 26 + 10)

= 52 x 62

Hence total variable names possible are

52 * 62 = 3224 Variable Names are possible.

Answer = 3224

You can also refer to the same handwritten explanation given below:


Related Solutions

in C programming language char character [100] = "hello"; a string array variable It is given....
in C programming language char character [100] = "hello"; a string array variable It is given. By writing a function called TranslateString, By accessing the pointer address of this given string, returning the string's address (pointer address) by reversing the string Write the function and use it on the main function. Function void will not be written as. Return value pointer address it will be. Sweat operation on the same variable (character) It will be made. Declaration of the function...
JAVA MASTERMIND The computer will randomly select a four-character mastercode. Each character represents the first letter...
JAVA MASTERMIND The computer will randomly select a four-character mastercode. Each character represents the first letter of a color from the valid color set. Our valid color choices will be: (R)ed, (G)reen, (B)lue and (Y)ellow. Any four-character combination from the valid color set could become the mastercode. For example, a valid mastercode might be: RGBB or YYYR. The game begins with the computer randomly selecting a mastercode. The user is then given up to 6 tries to guess the mastercode....
C Programming Language: For this lab, you are going to create two programs. The first program...
C Programming Language: For this lab, you are going to create two programs. The first program (named AsciiToBinary) will read data from an ASCII file and save the data to a new file in a binary format. The second program (named BinaryToAscii) will read data from a binary file and save the data to a new file in ASCII format. Specifications: Both programs will obtain the filenames to be read and written from command line parameters. For example: - bash$...
Please use the Java Programming language. This is the introductory course, chapter two. Please only use...
Please use the Java Programming language. This is the introductory course, chapter two. Please only use if/else if, else and while loop. We have not touch base with do and while do(I don't know if while do exist in Java). Create an application that converts number grades to letter grades. Console Welcome to the Letter Grade Converter Enter numerical grade: 90 Letter grade: A Continue? (y/n): y Enter numerical grade: 88 Letter grade: A Continue? (y/n): y Enter numerical grade:...
Programming in C language (not C++) Write a function definition called PhoneType that takes one character...
Programming in C language (not C++) Write a function definition called PhoneType that takes one character argument/ parameter called "phone" and returns a double. When the variable argument phone contains the caracter a or A, print the word Apple and return 1099.99. When phone contains the caracter s or S print the word Samsung and return 999.99. When phone contains anything else, return 0.0.
Create a basic program (C programming language) that accomplishes the following requirements: Allows the user to...
Create a basic program (C programming language) that accomplishes the following requirements: Allows the user to input 2 numbers, a starting number x and ending number y Implements a while loop that counts from x (start) to y(end). Inside the loop, print to the screen the current number Print rather the current number is even or odd If the number is even , multiply by the number by 3 and print the results to the screen. If the number is...
Question 1 Selecting the programming language is important Group of answer choices It allows a programmer...
Question 1 Selecting the programming language is important Group of answer choices It allows a programmer to pick their favorite language It identifies the best language as the best tool for solving a particular problem It enables only certain programmer to communicate None of these Question 2 High level languages include Group of answer choices Basic, Fortran, Cobol, Pascal, C HTML, XML Java, C++ All of these Question 3 A major ethical concern on the Internet Group of answer choices...
Using RAPTOR create a program that allows the user to input a list of first names...
Using RAPTOR create a program that allows the user to input a list of first names in on array and last names into a parallel array. Input should be terminated when the user enters a sentinel character. the output should be a list of email address where the address is of the following form: [email protected]
C programming language The program first creates a child process CP. So, there are two processes:...
C programming language The program first creates a child process CP. So, there are two processes: The parent process does the following: a. compute the summary of all the even number from 1, 2, .. 1000, and output this summary; b. wait for the termination of the child process CP, then terminate; The child process does the following: a. compute the summary of all the odd number from 1, 2, .. 1000, and output this summary; b. terminates;
The letter​ "t" makes up an estimated 9​% of a certain language. Assume this is still...
The letter​ "t" makes up an estimated 9​% of a certain language. Assume this is still correct. A random sample of 500 letters is taken from a randomly​ selected, large book and the​ t's are counted. Find the approximate probability that the random sample of 500 letters will contain 8.3​% or fewer​ t's.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT