Recent content by charmedbeauty

  1. C

    Segmentation Fault 11 in Flipifneeded Function

    Homework Statement when I am compiling my code I am getting a segmentation fault when entering in input but I don't know why? it prints Segmentation fault: 11 Homework Equations The Attempt at a Solution This is my code I tried looking up what was causing it but couldn't...
  2. C

    Using getchar, cant change variable?

    thanks will use next time I think that's what I want though... I am trying to program a game called reversi and I have a [8][8] array. The user does not input numeric co-od's though ie instead of [0][0] the user input a1 which is meant to be the element of the array [0][0]. thats why I...
  3. C

    Using getchar, cant change variable?

    Homework Statement I have some code and I use getchar to read in some input from the user say a5 I have assigned char letter; int number; letter = getchar(); number = getchar(); so that putchar(letter) prints a and putchar(number) prints 5 but when I try ...
  4. C

    Partial Fraction Decomposition for ∫18/((x2+9)(x-3))

    Homework Statement Find ∫18/((x2+9)(x-3)) Homework Equations The Attempt at a Solution Im a little stuck on this. 18∫1/((x2+9)(x-3)) Im not sure how to turn this into a partial fraction.. help. Thanks
  5. C

    Phase Diff. of 600 nm Light in Medium w/ Ref. Index 1.5

    path length= actual length × (refractive index) → pathlength/wavelength. = λ wavelengths ??
  6. C

    Phase Diff. of 600 nm Light in Medium w/ Ref. Index 1.5

    Homework Statement Light of free space wavelength 600 nm (6000 Å) travels 1.6 10 -6 m in a medium of index of refraction 1.5. Find: 1. the optical path length, [This is the physical path length x refractive index.] 2. the wavelength in the medium, and 3. the phase difference...
  7. C

    Reverse String: Fixing Compiling Warning

    Write a function void tnirp(char s[]); which takes a string s as a parameter and prints the characters of s in reverse order. Only characters up to the first '\0' or the first '\n' should be included, and a newline character '\n' should be printed at the end. Place the code for this...
  8. C

    Reverse String: Fixing Compiling Warning

    Ok so If I have tnirp() at the start of the code ie #include <stdio.h> #include <string.h> #define MAX_LENGTH 20 int main(int argc, char * argv[]){ tnirp() char s[MAX_LENGTH]; but that does not fix it ,,, I have to submit this in an hour so I really need help thanks.
  9. C

    Reverse String: Fixing Compiling Warning

    Homework Statement I am trying to write up code to reverse the order of a string i.e. input: and output: dna For some reason I am getting this compiling warning but I don't know what's wrong with my code... Homework Equations The Attempt at a Solution #include...
  10. C

    Having trouble explaining this phenomena

    the coils were placed on top of each other so the length of the coil (x) is now 2x. then we dropped the magnet through them so at some point I guess the magnet could have been in both coils at the same time since the length of the magnet was ≈x/2. does this make sense. ??
  11. C

    Having trouble explaining this phenomena

    Well in series the voltages would add and the current capacity would stay the same in parallel it would be the opposite so your saying that the ε ≈ dBA/dt so for ε/2... BA stays the same but the time the battery spends falling throught the loop approx. doubles since it is two loops.so...
Back
Top