Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About SunnyPalSingh

  • Rank
  1. Read This http://cplus.about.com/od/beginnerctutoria1/l/aa042902d.htm
  2. SunnyPalSingh

    interview data structures

    Read the FAQ's in this forum.
  3. SunnyPalSingh

    c doubt

  4. SunnyPalSingh

    difficult question indeed

    illegal is a very strong word. I would rather say it's conversion between incompatible types and I never denied that. I said it's a valid "C" code and I still say that. Again, I never said there is a problem with printf statement. I simply explained the OP the working of the program. Hope you get it.
  5. SunnyPalSingh

    can any1 write the folowing programs in C

    We'll really be interested to help you if you show your efforts.
  6. Function Pointers are pointers, i.e. variables, which point to the address of a function. For example statement like this void (*ptrtoFunction)(void);creates pointer to a function which takes no parameters and returns no value. Another example int (*ptrtoFunction)(float, char, char);creates pointer to a function which take three parameters of type float, char, char and returns int value. Sample code #include<stdio.h>void function(void); //function declerationint main(void){ void (*ptrtofunction)(void); //declaring pointer to a function which does not return anything and take no parameters ptrtofunction=function; //giving address of function to ptrtofunction ptrtofunction(); //calling of function through function pointer return 0; }void function(void){ printf("Function called through function pointer\n");}Function Pointers provide some extremely interesting, efficient and elegant programming techniques. Some of the places I remember they can be used are:[*]You can use them to replace switch/if-statements, to realize your own late-binding. [*]You can use them to implement callbacks. I hope this short description will get you started. If you have any doubts then you can post back.
  7. SunnyPalSingh

    Reputation System

    Hi I am regular visitor of many forums. Most of them have a feature of Reputation System.People add to the reputation of poster whose post is useful. I really like that concept. This will attract more people to start using forums. So, Is it possible to have such a thing on this Chetanasforum. Thank You
  8. SunnyPalSingh

    c/c++ projects very urgent

    What kinda project do you need???
  9. SunnyPalSingh


    >What is the use of pure virtual function? Pure Virtual Function A member function declaration that turns a normal class into an abstract class. You normally only implement those functions in a derived class. Sample Code class Shape { public: virtual void draw() const = 0; // = 0 means it is "pure virtual" ... };
  10. SunnyPalSingh


    >What is the use of Abstract base class?Abstract base class is a class which can not be instantiated. This class acts as base for other classes.
  11. SunnyPalSingh

    copy constructors in c++

    Copy Constructors are constructors which are used to construct and initialise an object from already constructed object.
  12. Hi Chetana MamI am unable to find any placement paper of Impetus. Can you tell me about the pattern.Please help. It's really urgent.Thank You.
  13. SunnyPalSingh

    this keyword

    this is a reference to the current object — the object whose method or constructor is being called. A constructor is a special member function which is executed when an object is instantiated from a class . super has many functions >Invoke the superclass constructor >Invoke the noarg superclass constructor >Invoke a parameterized superclass constructor >Invoke the noarg superclass constructor by default
  14. SunnyPalSingh

    puzzle for infy

    Someone Plz Explain This.
  15. SunnyPalSingh

    C expressions..

    Undefined Behaviour