Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

eight questions about programming C, thank you 1: What is wrong with the following program? You may assume that additional files (not shown) are present.

eight questions about programming C, thank you

1: What is wrong with the following program? You may assume that additional files (not shown) are present.

#include  
#include  
 
int main(void) { 
 int x; 
 scanf("%d", &x); 
 do_calculation(x); 
 return 0; 
} 

A. Nothing is wrong.

B. There is a problem with the scanf line.

C. There is no function prototype for the function "do_calculation".

D. Something else.

2: What is the point of having header guards?

A. They protect the header from corruption.

B. They ensure that a header file can only be compiled if the source file is included.

C. They stop a header file from being included multiple times.

D. They are the shields that guards the realms of men.

3: Which of the following need to be compiled?

Source Files

B. Header Files

C. Documentation Files

D. All Files

4: Which of the following can NOT be put in source files?

A. Include Directives

B. Macro Definitions

C. Function Definitions

D. External Variables

E. All of the above CAN be put in source files.

5: Which header files should be included in a source file?

A. The headers with function declarations the source file is using.

B. All headers in the project.

C. Headers that are related to the source files topic.

D. None of the above.

6: Are makefiles necessary for the compilation of multi-source file programs?

Yes

No

7: If you invoke the make utility without a target (i.e. "make"), which target will be built?

A. The last target

B. The first target

C. All the targets

D. None of the targets

8: When do you need to use the "extern" keyword?

A. When initializing an external variable.

B. When sharing an external variable.

C. When an external variable is used.

D. Never, it is optional.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions