Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Lv 31,402 points

Steven Jeffries

Favorite Answers68%
Answers120

I'm me.

  • Passing by reference in C.?

    Ok, so I am doing some school work, and I have to define a function just like this:

    int getline(char* linebuf, int bufsize);

    The user is supposed to be able to pass in a (char*) for linebuf, with a buffer size. This function is supposed to return the number of characters added to linebuf, and update the passed variable.

    For example, user has a variable, char* someString, and calls getline(someString, 30). This will read in from the console, and update someString.

    char* someString;

    int numChars;

    numChars = getline(someString, 30);

    //User is prompted to enter a line of text into the console.

    //Assume the string "Hello, World!" is entered.

    //numChars = 13

    //someString = "Hello, World!"

    As far as the actual logic of the function goes, I have that down. My concern is that I think the function should be declared as...

    int getline(char** linebuf, int bufsize)

    ...in order for me to be able to change the passed string, but the teacher was very clear about using that exact function and not being able to change it.

    How do I change a char* by passing it as a parameter?

    3 AnswersProgramming & Design8 years ago
  • Acme MR11 Dough Roller: How do I change the oil?

    I have an Acme MR11 Dough Roller. It is starting to squeak, and the directions on the side say to change the oil in it once a year. I've had it for five years, so I think it's time. Does anybody know how to do it?

    P.S. Not sure which question this category falls in, so sorry if it is labeled wrong.

    1 AnswerCooking & Recipes8 years ago
  • Star Trek into the Darkness releases tomorrow, right?

    Where is it playing? I can't find anything online about it. I live in Tempe, AZ, does anybody know if it is playing near me?

    2 AnswersMovies8 years ago
  • Is there a browser that can correctly print box shadows?

    I am currently duel booting between windows 7 and Ubuntu version 12.04. I have tried printing in Firefox 18.0.1, Konquerer 4.8.5, and Chromium Version 23.0.1271.97. Neither Firefox nor Konquerer even render the box shadow. Chromium does, but prints it as solid black. I would strongly prefer to use Ubuntu to work with these files. Does anybody know of a simple fix/hack, or a browser that can print box shadows properly? Thank you in advance for your help.

    2 AnswersOther - Computers8 years ago
  • How to solve: 1 + sqrt(3)^x = 2^x?

    I would like to know how to solve this kind of math problem. It's been a little bit since I've done this kinda stuff, so it is probably something obvious I forgot. I don't need the answer, I am more looking for an explanation of how to properly do similar problems. Thanks in advance!

    2 AnswersMathematics8 years ago
  • What are some simple programs for beginners?

    I am making a tutorial for learning how to program (in Java) for somebody. I was wondering what were some good, ground level programs that I could ask them to make. I already have some things such as making a mad lib, asking the user for numbers, and giving the average, calculating the first n Fibonacci numbers. But what are some other simple things to program that will be easy enough for a beginner but also inspire some sort of learning?

    2 AnswersProgramming & Design1 decade ago
  • How can I tell if a hard drive is compatible with my computer?

    I need to purchase a new hard drive for a Dell Inspiron 1525, but I don't know how to tell which hard drives will work in it. Will all laptop hard drives be able to fit in it?

    2 AnswersOther - Hardware1 decade ago