CoolInterview.com - World's Largest Collection of Interview Questions
Start Your Own website Now
Sponsored Links

Interview Questions
Our Services

Get 9,000 Interview Questions & Answers in an eBook.


  • 9500+ Pages
  • 9000 Question & Answers
  • All Tech. Categories
  • 14 MB Content

    Get it now !!



    Send your Resume to 6000 Companies


  • INTERVIEW QUESTIONS LANGUAGES C++ DETAILS
    Question :
    Write a function which returns the maximum digit of its arguments of type integer.
    Maxdigit(int)
    example:for(234,it will return 4,for 89->9


    Posted by: faa on 12/26/2010

    Contact faa Contact faa
    Category C++ Interview Questions
    Rating (0.3) By 560 users
    Added on 12/26/2010
    Views 369
    Rate it!
    Answers:

    void Maxdigit(int num)
    {
    int rem, big=0;
    while(num>0)
    {
    rem = num % 10;
    if(rem>big)
    {
    big=rem;
    }
    num = num / 10;
    }
    return big;
    }



    Posted by: Arun Kumar    

    Contact Arun Kumar Contact Arun Kumar

    If you have the better answer, then send it to us. We will display your answer after the approval.
    Rules to Post Answers in CoolInterview.com:-

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification  Enter the above shown code:*
    Inform me about updated answers to this question

       
    Related Questions
    View Answer
    Write a program to find the sum of integers that are evenly divisible by 10 bfor a given range (example 1 through 50)
    View Answer
    Input three positive integers representing the sides of triangle and determine wether they form a valid triangle.hint: in triangle the sum of any two sides must always be greater than the third side
    View Answer
    Write a program to convert given amount in EURO to local OMR by reading the amount in EURO from a file and write equivalent amount in OMR to another file.
    1 EURO=0.52004 OMR
    View Answer
    What is c++?
    View Answer
    Is in c++ an array consists of broken memory locations?
    View Answer
    what happen if i assign a number with a decimal point to an integer rather than to a float ? consider the following line of code : int a NUMBER = 5.4
    View Answer
    what should the 64-bit integer type on new,64-bit machines be?
    View Answer
    Applications of c++ object oriented programs?
    View Answer
    What is a mutable member?
    View Answer
    Define a constructor - What it is and how it might be called (2 methods).
    View Answer
    Anything wrong with this code?
    T *p = 0;
    delete p;

    View Answer
    Anything wrong with this code?
    T *p = new T[10];
    delete p;

    View Answer
    What is an orthogonal base class?
    View Answer
    What is an adaptor class or Wrapper class?
    View Answer
    What is the dangling pointer in c++
    View Answer
    What is a mixin class?

    View Answer
    What is a concrete class?
    View Answer
    What is the handle class?
    View Answer
    What is an action class?
    View Answer
    When can you tell that a memory leak will occur?
    View Answer


    Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.

    View ALL C++ Interview Questions

    User Options
    Sponsored Links


    Copyright ©2003-2014 CoolInterview.com, All Rights Reserved.
    Privacy Policy | Terms and Conditions

    Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Dedicated Servers | C Interview Questions & Answers

    Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes


    Cache = 0.015625 Seconds