Search:

Type: Posts; User: Tanuj_Tanmay

Search: Search took 0.00 seconds.

  1. Thread: c[-1]?

    by Tanuj_Tanmay
    Replies
    21
    Views
    2,643

    Compiler doesn't play dice..... Can u make out...

    Compiler doesn't play dice.....
    Can u make out when does it give segmentation fault and when the garbage value...
  2. Thread: c[-1]?

    by Tanuj_Tanmay
    Replies
    21
    Views
    2,643

    But if store some value there...it will print it...

    But if store some value there...it will print it
    example

    #include<stdio.h>

    int main()
    {
    int c[] = {2,5,6,8,3,6};
    c[-1] = 57;
    printf("%d",c[-1]);
  3. Thread: c[-1]?

    by Tanuj_Tanmay
    Replies
    21
    Views
    2,643

    why will C compiler give error if you try to...

    why will C compiler give error if you try to access a memory.....
    the only differnece here is you haven't stored any value there...
    it will definitely print some value...but it will be a GARBAGE.
    ...
  4. Replies
    13
    Views
    2,327

    many errors.... i)after u made ur data type...

    many errors....
    i)after u made ur data type named 'a',why r u using struct always....
    remember its like others ..int,float....why complicate it....
    ii)how will main() know that u changed...
  5. Replies
    7
    Views
    2,210

    I nearly got ur question...... Pls be more...

    I nearly got ur question......
    Pls be more specific.....
    Expand ur main()
  6. Replies
    10
    Views
    12,833

    int a,b; a=10; b=10; printf("%d\n",a++);...

    int a,b;
    a=10;
    b=10;

    printf("%d\n",a++);
    printf("%d\n",++b);


    OUTPUT:
    10
  7. Link List,Structures,Dynamic Memory Allocation,Pointers

    Require help in the program to solve Tower Of Hanoi.....
    The rule of the game can be found on http://en.wikipedia.org/wiki/Tower_of_hanoi

    ....what's the logic...
  8. Replies
    14
    Views
    11,049

    @matsp...kernel hacker... you got it...that was...

    @matsp...kernel hacker...
    you got it...that was the logic i used...
  9. Replies
    14
    Views
    11,049

    thanx Philip...nice work... u had completely...

    thanx Philip...nice work...
    u had completely different logic.....
    its always nice to know different methods to solve a particular problem..
  10. Replies
    14
    Views
    11,049

    //I finally did it....couldn't check for "fairly...

    //I finally did it....couldn't check for "fairly large numbers"....but it works...



    #include<stdio.h>

    int lastNonZero(int n);

    int main()
    {
  11. Replies
    14
    Views
    11,049

    the number can be 100....factorial of which is...

    the number can be 100....factorial of which is impossible for me to find....but my program sud give correct output to it...without actually calculating its factorial..
  12. Replies
    14
    Views
    11,049

    Program to print last non zero digit of n!

    I need an efficient program to print last non zero digit of n!...n can be fairly large number
Results 1 to 12 of 13