a valid identifier in the programming language


A valid identifier in the programming language FORTAN contains a string of one to six alphanumeric characters (the 36 characters A, B,...., Z, 0, 1,...9) starting with a letter. Determine how many valid FORTRAN identifiers are there?

Ans: There are 26 letters and 10 digits a total of 36 characters. It is restricted that an identifier can be of 1 to 6 characters long only, and first character must be a letter. Thus, Total number of identifiers of length 1 = 26

Total number of identifier of length 2 = 26*36

Total number of identifier of length 3 = 26*362

Total number of identifier of length 4 = 26*363

Total number of identifier of length 5 = 26*364

Total number of identifier of length 6 = 26*365

Thus number of valid identifiers = 26*[1 + 36 + 362 + 363 + 364 + 365] = 1617038306.

Request for Solution File

Ask an Expert for Answer!!
Mathematics: a valid identifier in the programming language
Reference No:- TGS0275061

Expected delivery within 24 Hours