Enthusiastic tricks and Techniques of c/c++java

deepu11111111

deepu11111111

@deepu11111111-Vg940z Oct 24, 2024
Hello Friends.....
Here you can post different tips , tricks and techniques of programming languages like c,c++,java etc.

In fact these languages will provide huge amount of magical things in the basic level also . So share your knowledge make thinks easier .

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • deepu11111111

    deepu11111111

    @deepu11111111-Vg940z Apr 8, 2012

    In Array , if you declare an array as
    int a[5]={1,2,3,4,5);
    and then if you want to print the address of any element in the array , you have to declare the pointer .
    But we can get the first elements address directly
    printf("%u",a);
    We know that the array is a continues memory allocation structure so that we can find all addresses of array elements without using pointers
  • deepu11111111

    deepu11111111

    @deepu11111111-Vg940z Apr 8, 2012

    You have to feel free to express your words , if they are any mistakes or clarifications in any post in this thread in order to make this thread more useful
  • K!r@nS!ngu

    K!r@nS!ngu

    @kr-at-nsngu-XqzcfU Apr 8, 2012

    HI #-Link-Snipped-# !
    Nice thread !
    deepu11111111
    int a[5]={1,2,3,4,5);
    The Closing Bracket you mentioned wrongly !
    It should be :
    int a[5]={1,2,3,4,5};
    Am i correct ?
  • deepu11111111

    deepu11111111

    @deepu11111111-Vg940z Apr 8, 2012

    You are right #-Link-Snipped-#
  • K!r@nS!ngu

    K!r@nS!ngu

    @kr-at-nsngu-XqzcfU Apr 8, 2012

    It is been one year i left my practice in programming, yet i will try to post tricks of Java here 😀 !
  • deepu11111111

    deepu11111111

    @deepu11111111-Vg940z Apr 9, 2012

    K!r@nS!ngu
    It is been one year i left my practice in programming, yet i will try to post tricks of Java here 😀 !
    You are most welcome #-Link-Snipped-#
    That's very useful
  • deepu11111111

    deepu11111111

    @deepu11111111-Vg940z Apr 12, 2012

    Post more tricks and special things of java,c++,c for expending our knowledge guys 👍
  • nareshkumar6539

    nareshkumar6539

    @nareshkumar6539-BKuVbx Apr 13, 2012

    Swap two variables without using third variable code will be like below
    a=a+b;
    b=a-b;
    a=a-b;
    the same thing we can do in a single like below.
    a=(a+b)-(b=a);
  • nareshkumar6539

    nareshkumar6539

    @nareshkumar6539-BKuVbx Apr 13, 2012

    In c if you want to print something on console without using semicolon then write printf statement
    inside if as condition like below.
    if(printf(" Crazy Computer Science Engineers"))