One line code !!!! just tell the output and why it is so ??

#include<stdio.h>
int main()
     printf("%d") ;
OR
#include<stdio.h>
int main()
     printf("%f") ;
}

You codedoes not have defined behavior.
When you pass "%d" to print,f you must also pass a second argument of type int.
When you pass "%f" to print,f you must also pass a second argument of type double.
If you don't pass required arguments, you cannot predict the results of the program.

Similar Messages

  • What will be the output and why

    Hi All,
    Can anyone help me in this.
    package javatests.test;
    import java.util.HashMap;
    import java.util.Map;
    public class CopyOfHashFunction1 {
         private int hashCode;
         public static void main(String[] args) {
                Map hashTable = new HashMap();
                String key1 = new String("a");
                String key2 = new String("a");
                System.out.println(key1.hashCode());
                System.out.println(key2.hashCode());
                System.out.println(key1 == key2);
                hashTable.put(key1, 1);
                hashTable.put(key2, 2);
                System.out.println("Size = " + hashTable.size());
                System.out.println("Value when key1 is searched:"+hashTable.get(key1));
                System.out.println("Value when key2 is searched:"+hashTable.get(key2));
    }Output:
    97
    97
    false
    Size = 1
    Value when key1 is searched:2
    Value when key2 is searched:2I feel there should be two entries in the HashTable, because when putting the second entry in the HashTable hash collision will happen and equals() method of String will be called. As the equals() method is returning false because the object references are different so HashTable should make another entry in the same bucket.
    Please let me know the answer.
    Thanks
    Jitendra

    Yes you are right jverd because the code in String.java is like, so it used to compare the string character by character.
    854       public boolean equals(Object object) {
      855           if (object == this) {
      856               return true;
      857           }
      858           if (object instanceof String) {
      859               String s = (String) object;
      860               int hash = hashCode;  // Single read on hashCodes as they may change
      861               int shash = s.hashCode;
      862               if (count != s.count || (hash != shash && hash != 0 && shash != 0)) {
      863                   return false;
      864               }
      865               for (int i = 0; i < count; ++i) {
      866                   if (value[offset + i] != s.value[s.offset + i]) {
      867                       return false;
      868                   }
      869               }
      870               return true;
      871           }
      872           return false;
      873       }

  • Is there a way to dial a contact by just typing its name in the keypad....as one can do in all the blackberry and android dialers...it is quite a job first to find the contact and then dial..

    Is there a way to dial a contact by just typing its name in the keypad....as one can do in all the blackberry and android dialers...it is quite a job first to find the contact and then dial..

    People - you critisize something you've no idea about! Smart dialing (also called T9) is NOT about text input for God's sake...it's about dialing a contact in a really quick and simple way just by clicking on one of 10 dial buttons (much bigger and easier to be tapped btw especially on the move) and the phone finds all the contacts matching typed combination
    For example I want to dial contact MLADD - I then tap on 6,5,2,3,3 and the phone searches for contacts matching all the combinations hidden on these numbers.
    Another example: see Apple's website containing contact line number specified in 2 ways: (800) MY-IPHONE (800-694-7466)
    Do you get my point now?
    I've used at least 6 different phones in my life so far and went through most of well known platforms including Symbian, Blackberry, Android, Windows Phone and now iOS. I'm very sure there is no better and faster way to quickly and easily dial somebody but by using a smart dial. Dialing somebody this way takes 2 seconds while dialing using tapping on contacts field, then typing a word using keyboard (assuming you click on a right button when on the move) takes a while longer and is frustrating.
    It's just a matter of a wider perspective when looking at this problem. If you would use it at least once - you would demand it as well.
    For people liking tapping everywhere to perform basic actions - let it be as it is, but why not to improve something by adding an additional option in setting and enable SmartDial?

  • HT2477 I just purchased the IMac and was in the process of setting it up and got locked out.  A password is being requested and I did not establish one.  Is there a default password for the imac?

    I just purchased the iMac and was in the process of setting it up and it locked up, requiring me to put in a password.  I never established a password, does the iMac have a default password?

    If you have been using the mac.com Apple ID to make iTunes purchases recently, then there should be no issues continuing to use it with the new iPhone. I would abandon the new ID as you will never get Apple to merge the two IDs. I have had a mac.com ID for years and continue to use it with my iPhone 4S.
    Tell us the issues that you encounter trying to set up the iPhone with the mac.com account.

  • Just bought the ipad4 and can't log into facebook. Times out and tells me to check my network connection. Anyone having the same problem or any ideas?

    Just bought the ipad4 and can't log into facebook. Times out and tells me to check my network connection. Anyone having the same problem or any ideas?

    Hey barnsieno10,
    Thanks for using Apple Support Communities.
    Looks like sign in issue, This article is a great resource for the message you are receiving.
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/ts3970
    Have a nice day,
    Mario

  • Calling a transaction code in between the program and use the output

    Hi frnds,
              i want to call a transaction code in between the program   and pass the input .After getting the output, use that output in the program

    Hi Navin,
                     Why don't you sit with ABAPer he can explain better.
    Regards,
    HAri.

  • I have two computers that I uploaded my Photoshop to. One I just removed the program and the second

    I have two computers that I uploaded my Photoshop to. One I just removed the program and the second I erased the hard drive and sent back to the company. I have a brand new computer and am unable to install Photoshop due to the two computer limit. How can I gain access again.

    in the future and if possible, deactivate (help>deactivate).
    for now, contact adobe support for an activation reset, http://helpx.adobe.com/contact.html?product=flash&topic=using-my-product-or-service

  • HT1325 Just brought the MacPro and first time using iTune and Yes I authorized the computer. But for a few purchased songs, only 30 seconds of the song plays and for one song off an album, a pop comes up saying I need to authorized the computer, but it is

    Just brought the MacPro and first time using iTune and Yes I authorized the computer. But for a few purchased songs, only 30 seconds of the song plays and for one song off an album, a pop comes up saying I need to authorized the computer, but I do this and it says it is authorized already. I click on the song to play it and this process repeat (saying it is not authorized, then saying it is already authorized)

    If your country's iTunes Store allows you to redownload purchased tracks, I'd delete your current copies of the dodgy tracks and try redownloading fresh copies. For instructions, see the following document:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Otherwise, I'd report the problem to the iTunes Store.
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the items that are not playing properly. If you can't see "Report a Problem" next to the items, click the "Report a problem" button. Now click the "Report a Problem" links next to the items.

  • HT1212 I just did the update and this phone is one week old.  Why can I not get into it now

    I just did the update and this phone is one week old.  Why can I not get into it now

    The passcode is the answer to the prompt "Enter Passcode" that you are very likely seeing.
    If not, you need to help us by telling us the exact symptoms of what you are seeing.

  • Adding One Line Code in all tables in Designer Trigger.

    I have 300+ tables in my Schema (All tables generated through Designer), I want to add one line of code in the begining of "Before Inset Row Trigger" of all tables, So what is the fastest way of doing that,
    Adding One Line Code in all tables in Designer Trigger.
    I don't want to go and modify each and every table

    You'll have to write a script that reads out the current contents of your triggers, add your line to this contents and dynamically "create or replace" the new trigger text.
    Beware, trigger_body column of user/all/dba_triggers is in a column with datatype LONG, so you'll have to use some sort of conversion.
    Good luck.
    regards,
    Rob.

  • Problems with "Background Eraser Tool" and "Blur". The tools don't affect the whole area but just connect the start and the last points.

    Hello!
    I have some issues with Photoshop CC 2014. The tools "Background Eraser Tool" and "Blur" won't work correctly. When I’m holding down the left mouse button and trying to erase or blur some area, the tools don’t affect the whole area but just connect the start and the last points – like drawing a line. These troubles exist with mentioned tools only, other tools work correctly.
    I’ve restored each tool separately, restored all the tools together, installed new drivers for tablet, re-installed Photoshop and even Windows. Nothing helped. These tools worked correctly earlier with the same adjustments, but one day something went wrong.
    How can I make the tools work correctly?
    Some information about my computer:
    • Notebook Lenovo Y560
    • Windows 7 Home Basic SP1 x64
    • Intel Core i5 2.53 GHz
    • 4Gb RAM
    • ATI Mobility Radeon HD 5730 1Gb
    • Tablet Wacom Bamboo CTL-470

    Hi,
    I have a similar problem with the Background Eraser tool as well. It's the same both on my PC and on my laptop, both running Win 8.1 and PS CC2014. Would be great to have a solution for this. Did you managed to find a fix?

  • Combine the output and make the sum by article

    In our company we have a lot of small orders (the customer orders every day the same articles) ->
    we make just one bill at the end of the month.
    Most customers don't wont the detail (to much paper) and therefore we have for the bill the possibility to just make the total bill (total per article...).
    so we design the two print program (global bill) and (detail bill) to output RD00,
    when we create a "Credit notes" for such a bill, we will get a  huge amount of paper (output type = BA00) -> so the question was if there was a standard program to combine the output and make the sum by article...
    Thanks.

    A custom print program is what u need, what u can do is create a report program which takes input all the articles ( a range thru selection screen wud do) and then calculate their sum or whatevr according to ur requirement and collate them into an internal table and output a script form thru the report itself, so no need to attach output type and all that.
    кu03B1ятu03B9к

  • Ajax is caching the output and not updating the page.If you force a second postback after you should have seen a popup (but didn'), you then see popup displayed

    Ajax is caching the output and not updating the page.If you force a second postback after you should have seen a popup (but didn'), you then see popup displayed

    Hey, thanks for replying. It is the user who needs to manually submit the page.
    Basically our page has a hidden div with various text fields and combo boxes. When the user click on specific links on the page, this div is populated and made visible to the user in server side code.
    What happens for all other browsers other than firefox 23 onwards (worked fine in 22) is that after the user clicks on the link, our server side code is executed via a HTTP post. The server then renders the hidden div and sends the additional HTML down to the browser via ASP.NET AJAX.
    With Firefox 23, the additional HTML is not rendered on the first postback. Subsequent clicks of the same link execute the same server side code but the additional HTML is rendered on the browser without issue.
    We've done a lot of debugging now and the issue is localised to a specific third party supplier's (Infragistics) control. I think Firefox 23 must have changed the way that the viewport or screen bounds are calculated or reflected back to this control as the issue seems to stop when we remove the control's MaintainPositionOnScroll attribute. It might be that the Firefox 23 DOM is not able to provide the screen dimensions accurately when the page is first rendered. I say this as the second postback renders the additional HTML fine.
    The control in question is quite an old version so I don't think it's your issue to be honest.
    Just so that this might be helpful to other developers using the Infragistics Window Dialog Control, setting MaintainPositionOnScroll to false solved this issue for us.

  • My hard drive crashed on my Mac Book Pro and I just had it replaced yesterday.  After restoring my data, Safari will not open.  The error message I continue to receive is "Safari quit unexpectedly"  Should I just delete the application and download a new?

    My hard drive crashed on my Mac Book Pro and I just had it replaced yesterday.  After restoring my data, Safari will not open.  The error message I continue to receive is "Safari quit unexpectedly"  Should I just delete the application and download a new one?

    http://swcdn.apple.com/content/downloads/37/23/041-5058/lr5tynbldi18zcrqo8a8uq88 rnjushqliu/Safari6Lion.pkg 
    Here you go.....

  • How do I create 2 motion tweens for one line of text?  the text needs to "fly-in-right", I can do that,

    how do I create 2 motion tweens for one line of text?  the text needs to "fly-in-right", I can do that, then it needs to "fly-out-bottom" again, I can do that, but not on the same line of text...any ideas...

    my question
    1- there is any way to assign the Fetch process to specific region so the process take all item in these region only.
    2- how can create manual process to fetch row into specific items in page ( i tray these code
    SELECT col1, col2, col3 ....
    INTO :P1_ITEM1, :P1_ITEM, :P1_ITEM...
    FROM table
    WHERE id = :P_id ) but no data retrieve .
    I do not think that it is possible to have more than one Automated Row Fetch process in a given page. See the thread:
    ORA-01403: no data found : Unable to fetch row multiple automated row fetch
    On your second question, the manual process should work provided:
    P_ID has a value when the process executes. You can do it this way:
    i. Make this process as a on-load After/Before header process
    ii. Make sure that P_ID page item has value when the process executes (set it from another page or before the pl/sql process executes)

Maybe you are looking for

  • I tried "Upgrading" 10.6.8 Server to 10.8 Server. And failed.

    No question here, just a report for others to read. So far I have always succesfully upgraded OS X Server. I started with 10.3 server and (except the PPC to x86) I always 'upgraded' not 'migrated'. But this time, my simple server (AFP (with PHD), DNS

  • Lightroom 2.5 with Wacom Bamboo touch & pen

    I'm using LR2.5 English on a Mac with a French keyboard. I want to be able to use the Wacom speed keys to change the size of the brush when doing local edits. When I enter the right or left square bracket ] [ - either via the keyboard or a Wacom spee

  • Custom ECC reports

    Hi All,     I have a transaction to run a Custom ECC report in ECC.I have to get the same kind of report in BI.    Now,how do I find the logic behind this custom ECC report.(ex.. how the dollar amounts are calculated for Orders). If I do F1help on ea

  • Group Messaging errors

    I cannot send or receive group messages when one or more member of the group is not on iMessage.  I have group messaging turned on in settings and send as SMS or MMS as well. This problem is on my iPhone and on my Mac. Does anyone have any suggestion

  • How retrieve custom fields only when using SPListItemCollection?

    Hi with following code I am retrieving a DataTable from a List: using (SPSite site = new SPSite("http://...")) using(SPWeb web = site.OpenWeb()) SPList oList = web.Lists.TryGetList("Serverliste"); if(oList != null) DataTable dt = oList.Items.GetDataT