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

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:10
Are special combinations of keys that tell a computer to perform a command. keypads multi-keys combinations shortcuts
Answers: 1
question
Computers and Technology, 24.06.2019 09:00
Why might you chose to crest a function resume
Answers: 1
question
Computers and Technology, 24.06.2019 19:30
Which phrase is the best definition of a pivottable a a table containing data that is organized horizontally b a table used to calculate financial pivot values c a tool used to summarize data d a table containing specific formatting
Answers: 1
question
Computers and Technology, 24.06.2019 23:30
True or false when a host gets an ip address from a dhcp server it is said to be configured manually
Answers: 1
You know the right answer?
Write a function int fromoctaltodecimal (int* octal, int n) that given an array octal of n integers,...
Questions
Questions on the website: 13722363