AceTheInterview
Jobs in Pune | Work better in teams | Socialize with friends | Submit Q&A | Tell a friend
Search site for 

Top 100 Interview Questions & Answers in a convenient and easy to read book!

“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”

– Ravi, California

Read more comments...

Interview Questions And Answers RSS Feed

Answers »

  1. Submitted By: gummibear — May 29, 2008
    +8 votes
      + -

    the 2nd declaration will generate an error because of the word int inside the parenthesis. The 1st is correct because it cast the value to int that is the data type of the variable temp

  2. Submitted By: Jai — June 2, 2008
    +8 votes
      + -

    The second statement is syntactically incorrect. First one statement is a valid declaration, however putting an (int) does not make any difference.

  3. Submitted By: Michael Rodov — June 18, 2008
    +4 votes
      + -

    first will probably make int=0
    the second I believe wont compile

  4. Submitted By: dilip — June 19, 2008
    -18 votes
      + -

    the former implies multiplication of 0 with 00 and then type-casting is done to int data type for temp variable.

    the later implies multiplication of 0 with a value as 00int.

  5. Submitted By: ramana — August 11, 2008
    -5 votes
      + -

    first int(0*00) type casting

  6. Submitted By: Talmeez ul Hassan — September 17, 2008
    +6 votes
      + -

    Here the first decleration
    int temp =(int) (0×00);
    is valid. The value stored in temp will be 0.

    The second declearation
    int temp = (0×00int);
    will return compile-time error “) expected

    In “0×00″ “x” is not multiplying operator. This is used to denoted hexadecimal.

  7. Submitted By: sanjeevi — September 28, 2008
    +0 votes
      + -

    The first one will compile right. But the second one is syntactically incorrect.

  8. Submitted By: mannu saini — November 19, 2008
    +1 votes
      + -

    First statement will be compiled without any error
    because (int) is type cast function that convert
    its value into integer.
    float b=4.3;
    ex:- int a=(int)b;
    then a=4;
    2nd stmt. will generate a error

  9. Submitted By: sri — December 1, 2008
    +1 votes
      + -

    the first declaration can be taken as type casting where the valuu (0*00) is converted to integer.
    the second statement is an error because (0*00int)
    makes no sense

  10. Submitted By: urusi — January 24, 2009
    -1 votes
      + -

    first one is correct.but 2nd one their are two error first temp is redeclaired and second invalid suffix of int.

  11. Submitted By: avtar — March 15, 2009
    not yet rated
      + -

    second statement has error
    we can’t give data type inside the parenthesis like this
    compiler give an erro

  12. Leave an Answer/Comment

    To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
    Click to hear an audio file of the anti-spam word

Our Sponsors
Our Sponsors
Contact Us | FAQ | Sitemap | Terms of Use | Privacy Policy | Tell a Friend

Copyright © 1999-2006 Jeeve Technologies LLC. All rights reserved.