Write a function printarray to print the hexadecimal numbers

Assignment Help Computer Engineering
Reference no: EM132109284

In this project: You will complete the following tasks.

1. Create a .bmp file, called myBmp.bmp, that stores the 4x3 image shown in Figure 4, where the 24-bit color code marked in each component.

You must calculate the number of padding bytes required in each row. Submit the memory map that is similar to Figure 3, but contains the data given in Figure 4. Hint: You can use a Hex Editor to create the .bmp file.

2. Write a C program to implement the following functions.

2.1. Include required libraries and define required variables and define a 2D array to store the data loaded from the file;

2.2. Write a function loadFile(myBmp) to read a .bmp file and store them into an 2D array of integers;

2.3. Write a function printMenu to print a menu for users to choose one of the following functions and call the function; The program must include a ‘q' option to exit the program.

2.4. Write a function printArray to print the hexadecimal numbers stored in the 2D array. You can use %x control character in printf;

2.5. Write a function flipHorizonal to flip the image horizontally and save the data into a new file called myBMPFlipped1.bmp;

2.6. Write a function flipVertical to flip the image vertically and save the data into a new file called myBMPFlipped2.bmp.

2.7. Write a function saveToFile to save the array data (modified through flip operation) into another file. This function should be called by flipHorizonal and flipVertical.

2.8. Write a function doAll, which performs the following tasks:

i. loadFile(myBmp)

ii. printArray;

iii. flipHorizonal;

iv. loadFile(myBMPFlipped1.bmp)

v. printArray;

vi. flipVertical

vii. loadFile(myBMPFlipped2.bmp)

viii. printArray;

2.9. Write the main function to perform at least the following tasks: [5 points]

i. Call loadFile to load the .bmp file data into the 2D array;

ii. Call printMenu;

iii. Return the menu after performing one function, and quit the program is ‘q' is entered.

Reference no: EM132109284

Questions Cloud

Unanticipated dollar appreciation : After an unanticipated dollar appreciation has occurred, what recommendation a company such as Cummins Engine to do with its strong domestic currency?
Billions of shoppers worldwide : An online shopping tax punishes Aussie consumers and denies shoppers the same choice available to billions of shoppers worldwide.
Construct and execute insert sql statements : Construct and execute INSERT SQL statements to add the sample data in the following tables to the Customer and Address tables.
Describe your findings in your eportfolio : Assignment - Paperback Zone - ITECH1100 Understanding the Digital Revolution - Andres and Benjamin want to improve the consistency of how they pay
Write a function printarray to print the hexadecimal numbers : Create a .bmp file, called myBmp.bmp, that stores the 4x3 image shown in Figure 4, where the 24-bit color code marked in each component.
Calculate the volume of a cylinder tank : Write a MATLAB program that calculates the volume of a cylinder tank by receiving the radius,height, & time from the user and calculates the volume of a liquid.
Should all countries have the same environmental standards : Should all countries have the same environmental standards? What about the same labor standards? Justify your answers.
Designing and implementing a mini search engine : You are probably familiar with Google, Bing or Yahoo, which are some of the most popular search engines that you can find on the Web.
What is the breakeven price : a. If forecasted sales are 5 million tablets, what is the breakeven price? b. Should Prescott discontinue selling this product?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd