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 COMPUTERS COMPUTER BASICS INTERVIEW QUESTIONS DETAILS
    Question :
    Can we have assignment statements inside if???
    like,
    if(x=5)
    {printf(?entered if?);
    }
    else
    {printf(?entered else?);
    }
    Is this code valid??


    Posted by: kartheek on 6/11/2012

    Contact kartheek Contact kartheek
    Category Computer Basics Interview Questions Interview Questions
    Rating (0.3) By 37 users
    Added on 6/11/2012
    Views 177
    Rate it!
    Answers:

    Can we have assignment statements inside if???
    like,
    if(x=5) // we cant assingn value inside a condition
    {printf(?entered if?);
    }
    else
    {printf(?entered else?);
    }
    Is this code valid??

    Posted by: kartheek on 6/11/2012

    Contact kartheek



    Posted by: Raushan    

    Contact Raushan Contact Raushan

    In c language non-zero values are treated as true nd zero for false .
    so

    when we assign x=5 within if condition then it treat as ..

    if(5)
    {

    }
    else
    {

    }
    so instruction within if is always true nd answer will be "?entered if?" as per ur instruction ..



    Posted by: shobhakar tiwari    

    Contact shobhakar tiwari Contact shobhakar tiwari

    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
    I read that I can install MS Office Home and Student 2010 on 3 computers. If I install it on my computer, computer crashes, then reinstall it on the same computer - would that count as 2 separate installations?
    View Answer
    What is the difference between windows-xp & windows7
    View Answer
    Print the below Series Only Using two variables with out using functions?

    1
    2 3
    4 5 6
    7 8 9 10
    11 12 13 14
    15 16 17 18 19
    View Answer
    What is a computer?
    View Answer
    why default constructor is mandatory in persistence class of hibernate
    View Answer
    table is already in database how i use hibernate application program
    View Answer
    How to format your computer?
    View Answer
    What is probably the most likely problem an administrator can expect to counter in a Windows XP system?
    View Answer
    what is difference between data and information?
    View Answer
    From where does memory allocated to constant strings.......e.g.

    char *ptr="Hi this is";

    View Answer
    wat is hardware and software?wats difference between hardware and software?
    View Answer
    give four real time example for operator overloading?what kind of process are using this operator overloading?
    View Answer
    When i set my desktop background, i can see it but once I log off and next log in again to my system, there is no background but a plain black skin. How do i fix this problem?
    View Answer
    Why silicon and germanium is used in researching the polarity of electrons?
    View Answer
    ? What?s the difference between FAT32 and NTFS?
    View Answer
    what is the difference bw data and information?
    View Answer
    what is the difference between c&c++ ?
    View Answer
    what is java applets ?
    View Answer
    Briefly describe the Threads ?
    View Answer
    Explain operate overloading in c++ concept with real time example ?
    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 Computer Basics Interview Questions 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