subject

Consider the following 3 programs:

1
//contents of file foo. c:
static int a = 5;
int main() {
f();
return 0;
}
//contents of file bar. c:
static int a = 10;
void f() {
printf("%d\n", a);
}

2
//contents of file foo. c:
int a = 5; int main() {
f();
return 0;
}
//contents of file bar. c:
void f() { int a = 10;
printf("%d\n", a);
}

3
//contents of file foo. c:
int a = 5;
int main() {
f(); return 0;
}
//contents of file bar. c:
int a;
void main() {
printf("%d\n", a);
}

if the command "gcc foo. c bar. c" is executed, which of the above programs result in a linker error?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. what critical detail must she have before she starts designing the brochure?
Answers: 1
question
Computers and Technology, 23.06.2019 08:00
Michael has written an e-mail to his employees that describes a new product special that will be introduced to the customers next week. by taking time to make sure the e-mail is well written, logical, and organized, michael has made sure his message has the characteristics of a) effective communicationb) ineffective communicationc) barriers to communicationd) workplace communication
Answers: 2
question
Computers and Technology, 23.06.2019 09:10
(328 inc. 448 ind. 480 in25. john has a collection of toy cars. he has 2 red cars, 4 blue cars, 4 black cars, and 6 yellowcars. what is the ratio of red cars to yellow cars? a. 1: 2b. 1: 3c. 1: 626. the net of a right triangular prism is shown below.
Answers: 2
question
Computers and Technology, 23.06.2019 20:00
Me ajude por favor , coloquei uma senha e nĂŁo consigo tira-la no chorme
Answers: 2
You know the right answer?
Consider the following 3 programs:

1
//contents of file foo. c:
static...
Questions
question
Mathematics, 04.04.2020 03:20
Questions on the website: 13722362