subject

Consider the following program, which consists of two object modules: 1 /* foo6.c */ 2 void p2(void); 3 4 int main() 5 { 6 p2(); 7 return 0; 8 } 1 /* bar6.c */ 2 #include 3 4 char main; 5 6 void p2() 7 { 8 printf("0x%x\n", main); 9 } when this program is compiled and executed on an x86-64 linux system, it prints the string 0x48\n and terminates normally, even though function p2 never initializes variable main. can you explain this?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:30
Write a function processpeople() that takes the name of a file as a parameter. each line of the file corresponds to information about a person. in particular a line contains either a name (in the form lastname,firstname with no spaces in it) or a name (lastname,firstname) and a year. the function will process the file, creating a person object for each line in the file. the function will print information about each line as it processes it, as well as appending the new person object into a list. make sure to use person methods to display information rather than recreating the work you did for the first problem. once the entire file has been processed, the function returns the list of person objects created from the file. if the file is empty, the function should return an empty list. if the input file cannot be opened, the function should print a message to that effect and then return an empty list. the following shows what would be displayed for two example files which have been provided in the link. the file none.txt does not exist. note that your function must work on an arbitrary file that consists of valid lines. you cannot assume anything about the file except that it contains lines that have the format described above.
Answers: 2
question
Computers and Technology, 22.06.2019 16:20
Octothorpe is another name for what common computer keyboard symbol?
Answers: 1
question
Computers and Technology, 23.06.2019 06:40
How many nibbles can be stored in a 16-bit word?
Answers: 1
question
Computers and Technology, 23.06.2019 12:10
2. fabulously fit offers memberships for$35 per month plus a $50 enrollmentfee. the fitness studio offersmemberships for $40 per month plus a$35 enrollment fee. in how many monthswill the fitness clubs cost the same? what will the cost be?
Answers: 1
You know the right answer?
Consider the following program, which consists of two object modules: 1 /* foo6.c */ 2 void p2(void...
Questions
question
Mathematics, 06.07.2021 17:40
question
English, 06.07.2021 17:40
question
Mathematics, 06.07.2021 17:40
question
Mathematics, 06.07.2021 17:40
question
English, 06.07.2021 17:40
Questions on the website: 13722359