Search:

Type: Posts; User: Avenger625

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    21
    Views
    21,552

    1. Very difficult to answer. Each language has...

    1. Very difficult to answer. Each language has its own features and advantages. One programming language might be better than the other depending on the context.
    For example, C is better than any...
  2. Problem understanding simple increment operation

    int i=5,j;
    j=++i + ++i + ++i;
    printf("%d",j); //22
    i=5;
    j=i++ + i++ + i++;
    printf("%d",j); //19


    Shall not it give 21 and 18 respectively?????
  3. Replies
    33
    Views
    2,820

    Though C standard does not guarantee order of...

    Though C standard does not guarantee order of evaluation but its very logical to evaluate 2*n prior to --n. Most compilers does that. I personally have checked with 6 compilers.

    For the sake of...
  4. Replies
    33
    Views
    2,820

    May be this what you want!! int f(int n)...

    May be this what you want!!



    int f(int n)
    {
    if(n==1) return 2;
    return 2*n+f(--n);
    }
  5. Replies
    17
    Views
    6,265

    Edit: while (ch=getchar() != '\n'); ...

    Edit:



    while (ch=getchar() != '\n');


    Had a different while statement and then when it was changed I deleted the last part and the parenthesis but forgot to change it to
  6. Replies
    17
    Views
    6,265

    @ Matticus: The effort is really praiseworthy. ...

    @ Matticus: The effort is really praiseworthy.

    @ ulti-killer: U seem to be a beginner, perhaps the following code would be easier for u.


    Code 1:



    #include <stdio.h>
  7. Replies
    12
    Views
    1,324

    Had it been 5.3, the case comes out to be the...

    Had it been 5.3, the case comes out to be the same!!
  8. Replies
    12
    Views
    1,324

    Thanks!!!

    Thanks!!!
  9. Replies
    11
    Views
    6,816

    >> >> scanf("%s",name);

    >> >> scanf("%s",name);
  10. Replies
    12
    Views
    1,324

    But Java and maximum C++ compiler warns and...

    But Java and maximum C++ compiler warns and require us to explicitly type cast it!!
  11. Replies
    12
    Views
    1,324

    Please re-explain!!! Thanks...

    Please re-explain!!!
    Thanks...
  12. Replies
    12
    Views
    1,324

    Warning: Possible Loss Of Precesion

    #include <stdio.h>

    int main(void)
    {
    int i=50/10.0;
    //int i=50/10.0f;
    return 0;
    }
  13. Replies
    7
    Views
    2,410

    When it is possible to simulate OOP features into...

    When it is possible to simulate OOP features into C then y dont we call it an OOP language?????
  14. Replies
    7
    Views
    2,410

    Polymorphism in C NOT in C++...!!! I tried...

    Polymorphism in C NOT in C++...!!!

    I tried google but what all i found was C++ codes. Would you please take the trouble of explaining me things or post some good links?
  15. Replies
    10
    Views
    2,508

    You would need something like "%.20s"!!! But...

    You would need something like "%.20s"!!! But since this 20chars per line is not fixed every time and you can't use any variable (maxNoChars) in the formatting string you need to think otherwise....
  16. Line 7: '&' missing. You perhaps overlooked it....

    Line 7: '&' missing. You perhaps overlooked it. Right one is, scanf("%c",&ques);
  17. Replies
    7
    Views
    2,410

    Polymorphism in C

    Me and my friends have had an argument over this topic.
    Is it anyway possible to implement polymorphism in C?????
  18. Replies
    26
    Views
    2,630

    Thanks allooottt...!!! It really helped...

    Thanks allooottt...!!! It really helped me....Thank you, all!!!
  19. Replies
    26
    Views
    2,630

    if(x>0.3) will not type promotion take place...

    if(x>0.3) will not type promotion take place here??? x getting converted to double first and then compared.....????

    If double represents floating-point nos. to a greater precession than float...
  20. Replies
    26
    Views
    2,630

    @Grumpy: "...a double represents it to greater...

    @Grumpy: "...a double represents it to greater precision than a float." -
    If double represents it to a greater precession than float then x>0.3 i.e 0.3f>0.3 must be false.

    @nonoob: Why does...
  21. Replies
    26
    Views
    2,630

    Thanks!! Got it....But just 2 queries.... 1....

    Thanks!! Got it....But just 2 queries....

    1. 0.3f shows 0.300000 on my m/c so



    if(x>0.3)

    should be false and it shall print "NONE". But its not doing so....Why...?????
  22. Replies
    26
    Views
    2,630

    Thanks!! Got it....But just 2 queries....

    Thanks!! Got it....But just 2 queries....
  23. Replies
    26
    Views
    2,630

    Problem with floating point comparisons

    Just an request: Please try in your machine before you reply.....

    Why is it showing X????



    #include<stdio.h>

    int main(void)
    {
  24. @grumpy: I see. Thanks. It works fine now when...

    @grumpy: I see. Thanks. It works fine now when min() is not called with size 0. But my question is - Why did Dev-Cpp work fine with that but not Pelles C x64?????
  25. @grumpy: Sorry I could not actually catch...

    @grumpy:

    Sorry I could not actually catch what or why is it for?! Could you please take the trouble of explaining it to me again.

    @whiteflags: The program was run on -
    1. Pelles C x64 on...
Results 1 to 25 of 53
Page 1 of 3 1 2 3