Search:

Type: Posts; User: sangi

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    3,216

    you can write class in C. The compiler...

    you can write class in C.
    The compiler internally passes the object by reference as the first argument for every member function.
    example:
    say you have a class,

    class X{
    int funcX(int y);...
  2. Replies
    7
    Views
    3,216

    No. I mean virtual functions in C. We can...

    No. I mean virtual functions in C.
    We can implement classes in C too. Since there is no compiler support for classes in C, you need to program in such a way that it works like a class.
  3. Replies
    7
    Views
    3,216

    virtual functions in C

    How to implement virtual functions in C??
  4. Replies
    3
    Views
    1,621

    program that kills itself

    How to write a program such that it will delete itself after exectution?
  5. Replies
    29
    Views
    16,020

    This is the code which gives the correct results....

    This is the code which gives the correct results. I have tried this.

    #include<stdio.h>
    int main(void)
    {
    int a[5],temp,i,j;
    printf("ENTER ARRAY ELELMENTS:");
    for(i=0;i<5;i++)
    ...
  6. Thread: Crazy question

    by sangi
    Replies
    18
    Views
    2,186

    I think you call it a garbage value.

    I think you call it a garbage value.
  7. Replies
    29
    Views
    16,020

    yaa. right. It won't work. sorry for that. The...

    yaa. right. It won't work. sorry for that.
    The swap should be between a[j] and a[i].
  8. Replies
    29
    Views
    16,020

    As the name of the board suggest, i would rather...

    As the name of the board suggest, i would rather concentrate on technical help than giving suggestions on the style of postings.
  9. Replies
    29
    Views
    16,020

    You seem more interested in non-technical...

    You seem more interested in non-technical help!!!!!
  10. Replies
    29
    Views
    16,020

    These changes in the for loop will help. for(...

    These changes in the for loop will help.

    for( i=0; i< 10; i++){
    for( j=i; j < 10; j++) {
    if( a[i] > a[j]) {
    temp = a[j];
    a[j] = a[j+1];
    a[j+1] = temp;
    }
    }
  11. Replies
    17
    Views
    3,670

    I understand that. I only want to know why an...

    I understand that. I only want to know why an additional variable will overwrite the next variable in the stack??
  12. Replies
    21
    Views
    2,428

    goto is best avoided. Its better you go in for...

    goto is best avoided. Its better you go in for other options when available.
  13. Replies
    21
    Views
    2,428

    The problem is that you are not getting the new...

    The problem is that you are not getting the new value of guess within the while
    #include <iostream>

    using namespace std;

    int main()

    {

    int guess;
  14. Thread: inline void

    by sangi
    Replies
    7
    Views
    10,079

    It doesn't compare. It returns pointer to first...

    It doesn't compare. It returns pointer to first occurrence of x in ISVOWEL string.
  15. Thread: inline void

    by sangi
    Replies
    7
    Views
    10,079

    Inline doesn't make any difference to your...

    Inline doesn't make any difference to your program except that it reduces the exceution( run) time.
  16. Thread: inline void

    by sangi
    Replies
    7
    Views
    10,079

    You can try this out. It works.

    You can try this out. It works.

    <<< UNTAGGED CODE DELETED >>>
  17. Thread: inline void

    by sangi
    Replies
    7
    Views
    10,079

    Yes, they both are different. inline void...

    Yes, they both are different.
    inline void hello() will result in the function call being replaced by the definition during compile time. Hence there will be no overhead involved in pushing the...
  18. Replies
    17
    Views
    3,670

    hey, I tried the same program with an additional...

    hey, I tried the same program with an additional int definition in the function foo. Now the data is getting corupted. Why is that?

    #include <stdio.h>

    char * foo(void);

    int main()
    {
    char...
  19. Replies
    17
    Views
    3,670

    That makes sense. thanks.

    That makes sense. thanks.
  20. Replies
    17
    Views
    3,670

    Hey, I am not understanding what you are trying...

    Hey, I am not understanding what you are trying to do in the function foo you wrote
    You got the syntax right. But in foo, you have created a character pointer that points no where and copied "hi" to...
  21. Replies
    17
    Views
    3,670

    return local variable

    It is said that, you should not return value that is created on stack. i.e the auto variable or the local variables. Can anyone tell me how the program below prints the right value "hi"???
    char*...
Results 1 to 21 of 21