Alpha Geek

(8)

$10/per page/Negotiable

About Alpha Geek

Levels Tought:
University

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Environmental science,Essay writing,Programming,Social Science,Statistics Hide all
Teaching Since: Apr 2017
Last Sign in: 347 Weeks Ago, 4 Days Ago
Questions Answered: 9562
Tutorials Posted: 9559

Education

  • bachelor in business administration
    Polytechnic State University Sanluis
    Jan-2006 - Nov-2010

  • CPA
    Polytechnic State University
    Jan-2012 - Nov-2016

Experience

  • Professor
    Harvard Square Academy (HS2)
    Mar-2012 - Present

Category > Programming Posted 28 May 2017 My Price 5.00

Write a function to checkarrow-10x10.png if a machine uses little endian or big endian notation.

QUESTION: Write a function to checkarrow-10x10.png if a machine uses little endian or big endian notation.

The basic structure of the program is given. You are expected to write the function checkEndianess(), completearrow-10x10.png the main function implementation to print the value returned by the function and print if the machine is A????1Little EndianA????1 or A????1Big EndianA????1, compile and run the program.

The function checkEndianess() should return the followingarrow-10x10.png values:

A????1 0 if the architecture is "Little Endian"

A????1 1 if the architecture is "Big Endian".

#include

int main() {

int check; // Variable: "check" will hold the value returned by the function

//Call the function to check the Endianness here check = checkEndianess ();

// Write the code to check the value returned by the function // print if the system uses little Endian or big Endian notation

return(0); }

/* Function "checkEndianess" checks the Endianness of the machine on which this program is executed. It takes an integer value as input and returns an

integer value.
The function should return 0 if the architecture is "Little Endian" and return 1 if the architecture is "Big Endian".

*/

int checkEndianess () {

}

KEY POINTS:

Make sure to call the function name correctly (same function name as given in this document) in the main program.

Comment out all non-C statements.

Follow all instructions mentioned above.

Answers

(8)
Status NEW Posted 28 May 2017 10:05 AM My Price 5.00

-----------

Attachments

1495966721-1224311_2_636314555042523327_sample-output.PNG
file 1495966723-Answer.docx preview (78 words )
#-----------inc-----------lud-----------e &-----------amp-----------;lt-----------;st-----------dio-----------.h&-----------amp-----------;gt-----------; -----------#in-----------clu-----------de -----------&am-----------p;l-----------t;s-----------tdl-----------ib.-----------h&a-----------mp;-----------gt;----------- i-----------nt -----------mai-----------n (-----------) -----------{ ----------- u-----------nsi-----------gne-----------d i-----------nt -----------x =----------- 0x-----------765-----------432-----------10;----------- ----------- ch-----------ar -----------*c -----------= (-----------cha-----------r*)----------- &a-----------mp;-----------amp-----------;x;----------- ----------- pr-----------int-----------f (-----------&qu-----------ot;-----------*c -----------is:----------- 0x-----------%x\-----------n&q-----------uot-----------;, -----------*c)-----------; ----------- i-----------f (-----------*c -----------== -----------0x1-----------0) ----------- -----------{ ----------- ----------- pr-----------int-----------f (-----------&qu-----------ot;-----------Und-----------erl-----------yin-----------g a-----------rch-----------ite-----------ctu-----------re -----------is -----------lit-----------tle----------- en-----------dia-----------n. -----------\n&-----------quo-----------t;)-----------; ----------- }----------- ----------- el-----------se ----------- { ----------- ----------- -----------pri-----------ntf----------- (&-----------quo-----------t;U-----------nde-----------rly-----------ing----------- ar-----------chi-----------tec-----------tur-----------e i-----------s b-----------ig -----------end-----------ian-----------. \-----------n&q-----------uot-----------;);----------- ----------- } ----------- -----------ret-----------urn----------- 0;----------- }----------- i-----------nt -----------che-----------ck_-----------for-----------_en-----------dia-----------nne-----------ss(-----------) -----------{ ----------- u-----------nsi-----------gne-----------d
Not Rated(0)