Homework

Homework Questions? Ask a Tutor for Answers ASAP

Ask an Expert,
Get an Answer ASAP!

Homework

1. Choose the INCORRECT statement. A) All variables must

Customer Question
1. Choose the INCORRECT statement...
1. Choose the INCORRECT statement.
A) All variables must be declared before they can be used.
B) Variables consist of letters, digits, and underscores.
C) Keywords can be used as variable names.
D) Variables cannot begin with a digit.

2. Which of the following usually indicates that there is no more input to be read by a program?
A) '\n'
B) '\0'
C) END
D) EOF

3. If a file is opened for reading and the file does not exist, what action is taken?
A) A new file is created.
B) A NULL value is returned.
C) An error message is issued.
D) An EOF value is returned.

4. Which of the following statements is true?
A) int expressions are always computed exactly; but float expressions can suffer round-off error
B) float expressions are always computed exactly; but int expressions can suffer round-off error
C) Both int and float expressions can suffer round-off error
D) Both int and float expressions will always be computed exactly

5. What is the effect of the following
Submitted: 8 years ago.Category: Homework
Show More
Show Less
Ask Your Own Homework Question
Answered in 4 hours by:
3/28/2009
Tutor: Raj, Engineer replied 8 years ago
Raj
Raj, Engineer
Category: Homework
Satisfied Customers: 1,290
Experience: 4 + Experiance in IT Industry
Verified
Only 9 questions or more are there....
Because 9th question is incomplete
Ask Your Own Homework Question
Customer reply replied 8 years ago

My apologies, here are the rest of the questions. Thank you.

 

9. What is the two's complement of -Y (negative Y)?

X=1100110000110011
Y=0000111100001010
A) 0000111100001010
B) 1111000011110101
C) 1111000011110110
D) 1100000000110001

10. What is the advantage of using a pointer to a structure as a parameter to a function, instead of the structure itself?
A) The code is easier to read.
B) It is more efficient because the structure is not copied.
C) There is no difference; it is a matter of style which is used.
D) Passing a structure as a parameter is not allowed.

11. Choose the invalid C statement.
A) int a, b=2, c=3;
B) char a[]="abc", *p = a;
C) a+b = 7;
D) ++(*p++);

12. If we want the random number library function to produce a different sequence of values each time the program is run which of the following statements should be used?
A) setenv(rand());
B) fopen(srand());
C) srand(clock());
D) srand(time(NULL));

13. The scalar() function uses po1?x to access the first member of the a structure. Which of the following constructs can be equally used within the function to access the same member?

struct vector
{
float x;
float y;
float z;
};

void main(void)
{
struct vector a = {2.3, 4.2, 6.,5};
struct vector b = {-1.2, 3.5, 5.1};
float scalar(vector *, vector *);
printf("The answer is %.2f", scalar(&a, &b));
}

float scalar(struct vector*po1,, struct vector *po2)
{
float s;
s=po1?x*po2?x + po1?y*po2?y + po1?z*po2?z;
return(s);
}
A) po1.x
B) *po1.x
C) (*po1).x
D) a.x

14. Choose the C++ statement which is equivalent to:

printf("Area = %g \n", PI * Radius * Radius);
A) cout >> "Area = " >> PI * Radius * Radius >> endl;
B) cout << "Area = " << PI * Radius * Radius << endl
C) cout << "Area = " << PI * Radius * Radius;
D) cout << "Area = " << PI * Radius * Radius << endl;

15. Given the structure and pointer declarations shown below, choose the assignment statement which sets the Price member of the structure pointed to by PC to 1000.

struct Computer
{
char Manufacturer[30];
float Price;
int Memory;
} *PC;
A) PC?Price = 1000.0;
B) PC.Price = 1000.0;
C) *PC.Price = 1000.0;
D) Computer.Price = 1000.0;

16. Assuming the following declarations:

int A=1, B=2, C=3, D=4;

What is the value of the following (Boolean) expression?

C == D || B > A && C
A) 0
B) 1
C) There is a syntax error in the expression.
D) There is no error, but the value cannot be determined from the information given.

17. Choose the correct statement below:
A) It is generally a good rule for applications programmers to use identifiers that begin with an underscore.
B) The compiler considers the string constant "this is a message" as 4 separate tokens.
C) An operator in C specifies an operation to be performed on an operand or a set of operands.
D) In the following expression: while(++jj >= 75), the body of the while loop is not executed when the expression ++jj is equal to 75.

18. Given the following two-dimensional array declaration and initialization, what is the value of the expression *(a[1]+2)?

int a[ ][4] = {{1,2,3,4},{5,6,7,8}};
A) 3
B) 6
C) 7
D) The subscript exceeds array bounds.

19. Using the rules of precedence, the following expression:

u*z+x/t-y+w%v

will be evaluated as:
A) u*(z+x/t)-(y+w)%v
B) (u*z)+x/(t-y)+(w%v)
C) (((u*z)+(x/t))-y)+(w%v)
D) (((u*z)+(x/t)-(y+w)%v

20. What is the output of the following code?

void Mystery (char *Str)
{
if (*Str != '\0')
{
Mystery(Str + 1);
printf("%s\n", Str);
}
}

Mystery("abcd");
A) d
cd
bcd
abcd

B) "null string"
d
cd
bcd
abcd

C) abcd
bcd
cd
d

D) d
cd
bcd
abcd

21. What is the purpose of a constructor?
A) To declare a new class
B) To copy a new value into a string
C) To initialize an object
D) To define macros with arguments

22. When a program is compiled, the following process takes place:
A) the compiler and the loader are invoked.
B) the loader is first invoked and then the preprocessor.
C) the compiler is first invoked, then the preprocessor, and finally the loader.
D) the preprocessor is invoked, then the compiler, and finally the loader.
E) the compiler translates the code into object code.

23. Which of the following statements allocates space for a variable of the defined enum type?
A) enum color {red, yellow, blue} paint;
B) enum color {red, yellow, blue};
C) enum {red, yellow, blue} paint;
D) a and c

24. Which of the following would typically be found as environment variables?
A) Base directory name
B) Total processor time used by a program
C) A list of names and phone numbers
D) All of the above

25. Which of the statements below is true of the following declaration:

int n=5, *p=&n;
A) p is a pointer initialized to point to n.
B) p is a pointer initialized to the value 5.
C) n and p are both pointer variables.
D) the declaration contains a syntax error

Tutor: Raj, Engineer replied 8 years ago
This answer is protected
Would you like to ask this question?
If you've already paid for this answer, simply Login.
Raj
Raj, Engineer
Category: Homework
Satisfied Customers: 1,290
Experience: 4 + Experiance in IT Industry
Verified
Raj and 87 other Homework Specialists are ready to help you
Ask your own question now
Ask Raj Your Own Question
Raj
Raj
Raj, Engineer
Category: Homework
Satisfied Customers: 1,290
1,290 Satisfied Customers
Experience: 4 + Experiance in IT Industry

Raj is online now

A new question is answered every 9 seconds

How JustAnswer works:

  • Ask an ExpertExperts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional AnswerVia email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction GuaranteeRate the answer you receive.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here.

DianeDallas, TX

< Previous | Next >

Meet the Experts:

LogicPro

LogicPro

Engineer

5,731 satisfied customers

Expert in Java C++ C C# VB Javascript Design SQL HTML

Manal Elkhoshkhany

Manal Elkhoshkhany

Tutor

4,551 satisfied customers

More than 5000 online tutoring sessions.

Linda_us

Linda_us

Finance, Accounts & Homework Tutor

3,138 satisfied customers

Post Graduate Diploma in Management (MBA)

Chris M.

Chris M.

M.S.W. Social Work

2,636 satisfied customers

Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)

F. Naz

F. Naz

Chartered Accountant

2,161 satisfied customers

Experience with chartered accountancy

Bizhelp

Bizhelp

CPA

1,887 satisfied customers

Bachelors Degree and CPA with Accounting work experience

Seanna

Seanna

Tutor

1,781 satisfied customers

3,000+ satisfied customers, all topics, A+ work

< Previous | Next >

Related Homework Questions
For LogicPro only: Design a C++ program in which a class
For LogicPro only: Design a C++ program in which a class should manage the free and allocated space. You should use a dynamic node implementation of link list to implement both lists for this assignme… read more
LogicPro
LogicPro
Engineer
Bachelor of Technology
5,731 satisfied customers
You can apply several different worksheets themes from which
You can apply several different worksheets themes from which tab? A.Insert, B. Home, C.File, or D. Page layout! Its not B What would be a situations in which you could use an excel chart to present yo… read more
GLENN
GLENN
Master of Mathematics
343 satisfied customers
Just wanted to see if you would be interested in helping me
Hello Again! Just wanted to see if you would be interested in helping me with two more programs? I will attach the Program outlines and the Word documents. Please let me know if you would like to help… read more
George Sibiya
George Sibiya
PhD
217 satisfied customers
6. How many worksheets display in the Excel window when you
6. How many worksheets display in the Excel window when you create a new blank workbook? A. 3 B. 2 C. 4 D. 1 Student Answer: A Answer: Incorrect Reference: Objective 2.17. What would be a situation in… read more
AnswersByEric
AnswersByEric
Software Developer
Associate Degree
37 satisfied customers
Question 18 of 20: Select the best answer for the question.
Question 18 of 20 : Select the best answer for the question. 18. What size paper should you use for a legal document? A. 3″ × 5″ B. 8½″ × 11″ C. 7¼″ × 10½″ D. 8½″ × 14″… read more
JA Engineer
JA Engineer
Broadcast Engineer
Diploma (Honors)
163 satisfied customers
I need help with Exam Number: 00701400 Lesson Name: General
I need help with Exam Number: 00701400Lesson Name: General Math I, Study Unit 2 Pennfoster test… read more
GLENN
GLENN
Master of Mathematics
343 satisfied customers
Answer all three questions and don't exceed 600 words for
Answer all three questions and don't exceed 600 words for each answer while using at least two references to support your answers for each question adopting APA citation in the text and in the referen… read more
F. Naz
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
QUESTION 1 A(n) _________________ policy are codified as
QUESTION 1A(n) _________________ policy are codified as standards and procedures that are used when configuring or maintaining systems.0.10000 points Save AnswerQUESTION 2In systems analysis and desig… read more
F. Naz
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
I need all the questions answered inthis pdf! I need all
I need all the questions answered inthis pdf! I need all sixty questions on all 21 pages answered!… read more
Steven, M.Acc.
Steven, M.Acc.
Instructor
Master\u0027s Degree
252 satisfied customers
Exam Number: 584002RR I need all t he questions answered in
Exam Number: 584002RR I need all t he questions answered in excel in this pdf file now! Asap!… read more
The-PC-Guy
The-PC-Guy
Bachelor\u0027s Degree
629 satisfied customers
How do you differentiate between an expression and an
How do you differentiate between an expression and an equation? Provide an example of each, where the two are either related to or similar to each other. … read more
GLENN
GLENN
Master of Mathematics
343 satisfied customers
IT 278 Network Administration 1. Server roles and features
IT 278 Network Administration 1. Server roles and features can be added and updated through both a GUI installation and a Server Core installation. In a short essay, explain how to use Windows PowerSh… read more
David L.
David L.
Bachelor\u0027s Degree
6 satisfied customers
Duane will use an open system LAN because he knows the open
Duane will use an open system LAN because he knows the open system will support varieties of hardware and software components made by different vendors. Steve will use a closed system LAN because he k… read more
F. Naz
F. Naz
Chartered Accountant
CA Finalist & Completed B.com
2,161 satisfied customers
For LogicPro only. need help with this debugging to input it
For LogicPro only.need help with this debugging to input it into raptor// A high school is holding a recycling competition // This program allows a user to enter a student's // year in school (1 throu… read more
LogicPro
LogicPro
Engineer
Bachelor of Technology
5,731 satisfied customers
I need the answer key to penn american literature, 986174RR
I need the answer key to penn foster american literature, 986174RR 986175RR 986176RR 986177RR 986178RR … read more
GLENN
GLENN
Master of Mathematics
343 satisfied customers
For LogicPro only * Reading data strings from a file *
For LogicPro only* Reading data strings from a file * Convert from int based container to templates or generics based * Accommodate dynamic resizing using this algorithm: 1. Starting with a dynamic si… read more
LogicPro
LogicPro
Engineer
Bachelor of Technology
5,731 satisfied customers
Question 1 of 20: Select the best answer for the question.
Question 1 of 20 : Select the best answer for the question. 1. For what type of document would you use the landscape page orientation? A. Three-column brochure B. Business letter C. Legal contract D. … read more
Cher
Cher
JustAnswer Expert & Mentor;Teacher/Tutor
Masters Degree
1,381 satisfied customers
5 - 5 x 5 +5. What is the answer to 5 - 5 x 5 + 5? Only that
no, only that two people using order of operations keeps getting different answers… read more
GLENN
GLENN
Master of Mathematics
343 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x