Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is what is in the directory: main.c file: main.c: #include #include vec.h #include linalg.h #include cs136.h int main () { trace_version(); struct Vec v

image text in transcribedThis is what is in the directory: main.c

file: main.c:

#include #include "vec.h" #include "linalg.h" #include "cs136.h" int main () { trace_version(); struct Vec v = {1,2}; v = add(v,v); trace_msg("Printing v.x"); trace_int(v.x); trace_msg("Printing v.y"); trace_int(v.y); int n = normSquared(v); trace_msg("Printing n"); trace_int(n); }

submit your launch.json and tasks.json files. not important but we will use the above location so that there is no confusion. file in any way. know, yet! As usual, we will rely on CS136 to teach you C programming. Step 3 (optional): To enable all IntelliSense features, you can configure the Include Path as discussed in the Editor section of this module. will populate the default configuration in taskz.json. This time, let's customize the configuration exactly as below: 1. For the label attribute, give it the value "CS136 Build Task". 2. Add the two different include paths for cs136.h and vec. h/linalg. h to the args attribute using the appropriate include compiler flag. 3. Add the object files /u2/cs1361/pub/common/cs136.0./u /cs1361/pub/1ab4/q2/vec.0and/u2/cs1361/pub/1ab4/q2/linalg0 to the args attribute. 4. Set the output executable's name to be myprogram. Step 5: Let's configure launch. json so that we can run the program we just built. the file by switching to a different file and then back. Click on Add Configurat ion within the JSON file. 2. Select c/C++:(gdb) Launch. 3. In the default configuration that is created, update the program to $ workspaceFolder }/ myprogram. Compiling via VS Code lesson where we configured this task for an example. With main. c selected in the Editor, confirm that you can Run without Debugging. that will be at the location /cs1361/1ab4/q2/. vscode

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

friendliness and sincerity;

Answered: 1 week ago