c Interview question.

This is a discussion on c Interview question. within the C Programming forums, part of the General Programming Boards category; Dear Friends, I have been asked following question in the interview. I tried to find the result but couldnt achieve ...

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    1

    c Interview question.

    Dear Friends,

    I have been asked following question in the interview. I tried to find the result but couldnt achieve it.

    Given:
    Concentration = (ep-el) / (ep-em) * (em/el)1/3 *100.
    Where "ep" and "em" are constants. Write a "C" program to determine "el" for
    concentrations 0 to 100 step 10.

    Is it a C precedence trick or quadratic equation problem?

    Any light on this is very useful.

    Have a Good Day.

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    Quote Originally Posted by bkankur View Post
    ...Given:
    Concentration = (ep-el) / (ep-em) * (em/el)1/3 *100.

    Your given would get a compiler error.
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,311
    hmm... it does not look like there is any trick to it. It seems more like a test of your algebra skills, followed by understanding of how to express the resulting expression in C with care taken to choose the correct data types so as to obtain the desired result.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    DESTINY BEN10's Avatar
    Join Date
    Jul 2008
    Location
    in front of my computer
    Posts
    804
    Quote Originally Posted by bkankur View Post
    Dear Friends,

    I have been asked following question in the interview. I tried to find the result but couldnt achieve it.

    Given:
    Concentration = (ep-el) / (ep-em) * (em/el)1/3 *100.
    Where "ep" and "em" are constants. Write a "C" program to determine "el" for
    concentrations 0 to 100 step 10.

    Is it a C precedence trick or quadratic equation problem?

    Any light on this is very useful.

    Have a Good Day.
    There is a similar question in K&R for temperature conversion. It's a simple question and doesn't even sound like an interview question. Simply apply loop with increment of 10.
    HOPE YOU UNDERSTAND.......

    By associating with wise people you will become wise yourself
    It's fine to celebrate success but it is more important to heed the lessons of failure
    We've got to put a lot of money into changing behavior


    PC specifications- 512MB RAM, Windows XP sp3, 2.79 GHz pentium D.
    IDE- Microsoft Visual Studio 2008 Express Edition

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SDL buffer channels question
    By TriKri in forum Game Programming
    Replies: 3
    Last Post: 12-09-2009, 04:52 PM
  2. Newbie question, C #
    By mate222 in forum C# Programming
    Replies: 4
    Last Post: 12-01-2009, 05:24 AM
  3. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  4. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  5. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21