1 2 points 1 void foo0 nt x 5 4 int main0 foo0 return 0 If

1. (2 points) 1 void foo0 nt x = 5; 4 int main0 foo0 return 0; If you are running gdb on the executable of the above code, what are the two gdb commands that you need to insert in order to start running at the main function. a. (gdb) break main b. (gdb) run If you had a breakpoint set at line 5 and you were on that breakpoint, what line would you be on if you entered a. next line 4 b. step line 2 2. (1 point) Suppose you have a tar archive cxdc.tar in the current directory containing thousands of files. You wish to extract this tar archive into the current directory. What command would you use? tar xvt /home directory xcdc.tar 3. (1 point) Write the command you would use to display the number of lines that contain the word \'winter\' in the file -MyBlog/blog.txt located in your home directory. The command should ignore the case of the letters.

Solution

1.) a.run (run allows you to run the main application)

b. next

2.) tar -xf archive.tar -c /target/directory

3.) apropos search-word

4.) a. memory leaks

5.)has alraedy executed

6.) put the following command in the file2

objcopy file1

7.) This error will be shown where the leaked memory is allocated. Free that memory using free() command

8.) a. apples apples grapes melon orange peaches peaches strawberry

b. peaches apples strawberries grapes oranges melon

 1. (2 points) 1 void foo0 nt x = 5; 4 int main0 foo0 return 0; If you are running gdb on the executable of the above code, what are the two gdb commands that y

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site