Search:

Type: Posts; User: *al

Search: Search took 0.00 seconds.

  1. Thread: pointer problem

    by *al
    Replies
    13
    Views
    1,370

    Commontater: Dude..i got a lil confused with that...

    Commontater: Dude..i got a lil confused with that but Thanks yet again!
  2. Thread: pointer problem

    by *al
    Replies
    13
    Views
    1,370

    Stack!! I guess that solves it.Thats what i was...

    Stack!! I guess that solves it.Thats what i was wondering too.but i wasnt sure if this is what is really happening.
    and hey thanks for the insight and sorry for the trouble!
  3. Thread: pointer problem

    by *al
    Replies
    13
    Views
    1,370

    so u r saying that i am giving p 5 as its...

    so u r saying that i am giving p 5 as its address.and then i am printing 5? I dont think thats a legal statement .i cant just assign an address value to whatever i please.address is fixed.aint it?
  4. Thread: pointer problem

    by *al
    Replies
    13
    Views
    1,370

    main() { int *p,x=5; p=&x; printf("value of x...

    main()
    {
    int *p,x=5;
    p=&x;
    printf("value of x is %d\n",*p); //
    printf("Address of x is %u\n",p); // i am printing the value of p here.but hey look i dont get 5.
    }


    p is pointing to the int...
  5. Thread: pointer problem

    by *al
    Replies
    13
    Views
    1,370

    pointer problem

    I just want to how this code is working



    main()
    {
    int *p = 5;
    printf("%d\n",p);
    }
  6. Replies
    13
    Views
    2,213

    Well,i am actually glad that i got the help...

    Well,i am actually glad that i got the help needed 'eventually'.

    I wouldnt say i made a mistake in that code.I was rather playing to see what output i would get if i change a few things in it.And...
  7. Replies
    13
    Views
    2,213

    Oh ok i got it.Thanks buddy. And i do...

    Oh ok i got it.Thanks buddy.

    And i do apologise for apparently posting something in a wrong fashion.In my defense I wanna say that i am new and quite unsure about what exact mistake u r pointing...
  8. Replies
    13
    Views
    2,213

    CommonTater... Thanks a lot.Your information was...

    CommonTater... Thanks a lot.Your information was really helpful and cleared my doubts.

    I have set warnings to level 2.although it is not showing any such message about two code sections.
    ...
  9. Replies
    13
    Views
    2,213

    Q.1 ok so when i use printf("%c",putchar(c)); and...

    Q.1 ok so when i use printf("%c",putchar(c)); and i get two n's ...which n is the first one being printed...the one by putchar() or by printf().

    Q.2 and if "%c" is being assigned a value by...
  10. Replies
    13
    Views
    2,213

    Printf("%c",putchar());

    #include<stdio.h>

    main()
    {
    {
    int c;
    printf("Enter a character:");
    c=(int)getchar();

    if(c=='y'||c=='Y')
Results 1 to 10 of 10