Join Eduardo Corpeño for an in-depth discussion in this video Powers and exponentials example, part of C Standard Library.
- [Narrator] This will be another very simple example…where I'll show you these functions.…So I will do that in a series of printf statements.…Let me first write, for example,…three raised to the fourth power equals this value.…So I will call the pow function…which uses the base and the exponent as arguments.…So I'll use 3.0 and 4.0.…
Let's break a line here,…and let's see how this looks.…And we get that three raised to the fourth power equals 81,…which seems about right.…Now, let's see some other functions.…Let's now see the exponential function.…And let's use something that we can identify.…So let's use the exp2 function.…So this one raises two to some power.…
So let's say, two raised to the tenth power…equals this number.…So again I will raise two to the tenth power.…Let's see how it looks.…And we got that two to the tenth power is 1,024.…So notice how the power function is different…from the exp2 function because exp2 uses two as the base…and by the way, exp uses 10 as the base…but power uses an arbitrary base and an arbitrary exponent.…
- Working with header files
- C constants and types
- Unformatted and formatted input/output
- Accessing files with C functions
- Generating random numbers
- Converting strings
- Sorting and searching for data
- Manipulating strings
- Using mathematical functions
Skill Level Intermediate
1. The C Standard Library
2. Input and Output Library: stdio.h
3. General Purpose: stdlib.h
4. String Functions: string.h
5. Mathematical Functions: math.h
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.