Recent content by SnakeDoc

  1. SnakeDoc

    Pointers -->(makes integer from pointer without cast)

    The professor makes us comment all the code he has grad students correct our code and check to see if we have comments when ever I think something doesn't really need a comment for example the //Declare variables I seem to get docked points. The //call the main function thing is just what we...
  2. SnakeDoc

    C Programming: Arrays and pointers

    Thank you I haven't used an array in a while and it's a good thing you cleared that up my next exam will be focusing on arrays.
  3. SnakeDoc

    Pointers -->(makes integer from pointer without cast)

    Homework Statement I am to write a program that has its user enter 100 character or less and determine if the line is a palindrome or not. I must use pointers one that starts at the beginning and one at the end of the array that must work their way in until they meet.(I'm also having trouble...
  4. SnakeDoc

    C Programming: Arrays and pointers

    I don't understand how I have too many initializers? I mean maybe I'm remembering incorrectly but doesn't the amount of elements equal the number inside the brackets plus 1. So an array b[6] has seven element because it starts with element 0?
  5. SnakeDoc

    C Programming: Arrays and pointers

    Write a program that asks the user to enter a time (expressed in hours and minutes, using the 24-hour clock). The program then displays the departure and arrival times for the flight whose departure time is closest to that entered by the user, using standard time. Specifications: The program...
  6. SnakeDoc

    C Programming: Arrays and pointers

    Homework Statement So I created two arrays one called departure_time and the other arrival_time and populate each array as follows. I've tried both putting 8 and defining N as 8 int departure_times[N]={480, 538, 679, 767, 840, 945, 1140, 1305}; int arrival_times[N]={616, 712, 811, 900, 968...
  7. SnakeDoc

    Gauss' Law: Infinite plane with charge

    I realized my mistake its supposed to be .2603mm I converted from Meters to millimeters improperly. Thank you.
  8. SnakeDoc

    Gauss' Law: Infinite plane with charge

    Homework Statement An infinite plane of charge has surface charge density 6.8 µC/m2. How far apart are the equipotential surfaces whose potentials differ by 100 V? In mm Homework Equations E=σ/(2ε0) The Attempt at a Solution So first I solved for E= 6.8e-6/(2*8.85e-12) = 384170.791 then...
  9. SnakeDoc

    Charles' Law Math Problem: Volume Change at Constant Pressure

    solved my problem. I needed to first convert the temp to kelvin then invert that number to get my factor.
  10. SnakeDoc

    Charles' Law Math Problem: Volume Change at Constant Pressure

    Homework Statement A gas is kept at constant pressure. If its temperature is changed from 38 to 132°C, by what factor does the volume change? Homework Equations V1T2=V2T1 The Attempt at a Solution V1*132=V2*38 V2/V1=132/38 V2/V1=66/19 Am I just reading something wrong or did just use the...
  11. SnakeDoc

    Programming with C (math library error)

    Yes thank you that worked. It was actually pointed out as part of the instructions that I would need to call the math library using -lm command but I must have skip over it the first time.
  12. SnakeDoc

    Programming with C (math library error)

    Homework Statement I have make a program that solves the distance between 2 points on a triangle. Homework Equations none The Attempt at a Solution /* homework 1 */ #include <stdio.h> #include <math.h> int main(void) { // Declare and initialize variables float x1=1, y1=5, x2=4, y2=7...
  13. SnakeDoc

    A simple Fluid Dynamics/Pressure HW question

    I guess I did. I didn't even notice it said diameters thanks. I must remember to read more thoroughly next time.
  14. SnakeDoc

    A simple Fluid Dynamics/Pressure HW question

    Homework Statement A piston of cross-sectional area a is used in a hydraulic press to exert a small force of magnitude f on the enclosed liquid. A connecting pipe leads to a larger piston of cross-sectional area A (the figure). If the piston diameters are 3.63 cm and 50.7 cm, what force...
Back
Top