subject

Write a function int fromoctaltodecimal (int* octal, int n) that given an array octal of n integers, all in the range 0 – 7, representing a number in octal representation, returns an integer corresponding to the number in decimal representation. examples: • for array 1 0 0 1 and n = 4, the function returns the integer 1 · 8 3 + 0 · 8 2 + 0 · 8 1 + 1 · 8 0 = 513. • for array 1 0 1 0 0 and n = 5, the function returns the integer 1 · 8 4 + 0 · 8 3 + 1 · 8 2 + 0 · 8 1 + 0 · 8 0 = 4096 + 64 = 4160. • for array 0 and n = 1, the function returns the integer 0 · 8 0 = 0

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 02:00, kelseybell5522
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
image
Computers and Technology, 23.06.2019 04:40, Koriunaa
The narrative structure of the popular movies can be broken down into
Answers: 3
image
Computers and Technology, 23.06.2019 16:00, natasniebow
Kenny works with an it company. his company is about to launch new software in the market. he has to ensure that this new software is functional and meets all of the quality standards set up at the planning stage. which job profile is kenny likely to have? kenny is likely to have the job profile of a blank .
Answers: 2
image
Computers and Technology, 24.06.2019 08:30, colebuug9
Aconsumer would pay an extra they used the rent to own program to buy the computer, rather than using cash. for all of the items, is the cheapest option over the life of the contract. the most expensive overall option is to use purchase the item.
Answers: 2
You know the right answer?
Write a function int fromoctaltodecimal (int* octal, int n) that given an array octal of n integers,...

Questions in other subjects:

Konu
Chemistry, 20.12.2020 21:40
Konu
History, 20.12.2020 21:40