Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I am trying to test this program with gcc -Wall -Im but it is showing me this error /tmp/cctn74rT.o: In function `main': voltage.c:(.text+0x42): undefined

Hello, I am trying to test this program with gcc -Wall -Im but it is showing me this error "/tmp/cctn74rT.o: In function `main': voltage.c:(.text+0x42): undefined reference to `exp' collect2: ld returned 1 exit status"

this is the program

#include

#include

#include

// defining the constants

#define V 10

#define R 3000

#define C 50 * pow(10,-6)

#define tau 0.15

int main()

{

//declaring the data types

float t, vt;

// displaying the header of the table

printf("Time (sec)\t voltage ");

// loop to calculate the voltage vt per the provided equation , 1/15 = 0.0666

for (t=0;t<=1;t=t+0.0666)

{

vt=V*(1 - exp(-t/tau));

// displaying data

printf("%0.02f \t\t%0.02f ",t,vt);

}

return 0;

}

// end

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

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions

Question

Describe business models and discuss their importance.

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago