12/15/19

Physics Force Problem (Please help!)

A boulder weighing 2.0x10^4 N is resting on a hillside with a slope of 37 degreesa) what force tends to cause the boulder to slide down the hill?b) If there is no friction on the surface, what is... more

12/09/19

Need help writing python code to look at 3 things from an excel data file.

I need help with writing some codes for my project using Python. This is a very intro level class as I am an english major but took this class as interested in biostats (micro is my minor). We are... more

Ball thrown in the air, max height

A ball is thrown vertically upward from the ground with an initial velocity of 109 ft/sec. Use the quadratic function h(t)=−16t^2+109t to find how long it will take for the ball to reach its... more
C++

09/30/19

What are virtual functions

C++

09/22/19

Storing C++ template function definitions in a .CPP file?

I have some template code that I would prefer to have stored in a CPP file instead of inline in the header. I know this can be done as long as you know which template types will be used. For... more

09/20/19

A projectile is thrown with an initial speed of 12 m/sec horizontally from the top of a building 64 meters above ground level.

a)    Determine the time taken by the projectile to hit the ground.b)    How far does the object land from the base of the building?c)    What is the vertical velocity component of the... more
C++

09/14/19

Typedef function pointer?

I'm learning how to dynamically load DLL's but what I don't understand is this line typedef void (*FunctionFunc)(); I have a few questions. If someone is able answer them I would be... more
C++

08/30/19

What is the easiest way to initialize a std::vector with hardcoded elements?

I can create an array and initialize it like this: int a[] = {10, 20, 30}; How do I create a `std::vector` and initialize it similarly elegant? The best way I know is: ... more
C++

08/27/19

What is the easiest way to make a C++ program crash?

I'm trying to make a Python program that interfaces with a different crashy process (that's out of my hands). Unfortunately the program I'm interfacing with doesn't even crash reliably! So I want... more
C++

08/22/19

std::string to char*?

I want to convert a **std::string** into a **char*** or **char[]** data type. std::string str = "string"; char* chr = str; Results in: **“error: cannot convert ‘std::string’ to ‘char’... more

06/21/19

Can we implement a doubly-linked list using a single pointer?

I want to use a structure like: struct node { char[10] tag; struct node *next; }; I want to use the above structure to create a doubly-linked list. Is that possible and if yes, then how I can... more

How to leave/exit/deactivate a Python virtualenv?

I'm using virtualenv and the virtualenvwrapper. I can switch between virtualenv's just fine using the workon command. me@mymachine:~$ workon env1 (env1)me@mymachine:~$ workon env2 ... more
C++

05/24/19

What is an unsigned char?

In C/C++, what an `unsigned char` is used for? How is it different from a regular `char`?
C

05/04/19

Getting an incorrect output for e^x function I made for class, and getting the wrong number of terms?

So for my Intro to computer programming class we have to write 3 separate functions, one to calculate factorials, one to calculate powers (x^n), and one to calculate the number of terms of the... more

04/26/19

Why does the C preprocessor interpret the word "linux" as the constant "1"?

Why does the C preprocessor in GCC interpret the word `linux` (small letters) as the constant `1`?test.c: #include <stdio.h> int main(void) { int linux = 5; ... more
C

04/18/19

How to printf "unsigned long" in C?

I can never understand how to print `unsigned long` datatype in C.Suppose `unsigned_foo` is an `unsigned long`, then I try:* `printf("%lu\ ", unsigned_foo)`* `printf("%du\ ", unsigned_foo)`*... more
C

04/13/19

Correct format specifier for double in printf?

What is the correct format specifier for `double` in printf? Is it `%f` or is it `%lf`? I believe it's `%f`, but I am not sure.###Code sample #include int main() { double d = 1.4; ... more
C

03/27/19

Is it better to use C void arguments "void foo(void)" or not "void foo()"?

What is better: `void foo()` or `void foo(void)`?With void it looks ugly and inconsistent, but I've been told that it is good. Is this true?Edit: I know some old compilers do weird things, but if... more
C++

03/18/19

Single quotes vs. double quotes in C or C++?

When should I use single quotes and double quotes in C or C++ programming?
C

03/18/19

Is there a performance difference between i++ and ++i in C?

Is there a performance difference between `i++` and `++i` if the resulting value is not used?
C

03/18/19

C pointer to array/array of pointers disambiguation?

What is the difference between the following declarations: int* arr1[8]; int (*arr2)[8]; int *(arr3[8]);What is the general rule for understanding more complex declarations?

02/21/19

HELP SOLVE this equation

an earthquake measured 4.2 on the Richter scale. Use the formula R = log(a/a0) to determine approximately how many more times strong the wave amplitude A of the earthquake was than A0

09/30/15

a catapult launches a pumpkin at 80m/s at 60 degrees above the horizontal.what horizontal distance will it travel?

A physics question involving resolving motion vectors

10/22/14

I have to create a store receipt in Python 3.4.1. It has to allow unlimited input of items, show subtotal, tax, and total. Please help.

This is what I have and it doesn't work:   print("===============================================================================")print("... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.