Programming in C & C++ & OOP

Discussion in 'C++' started by nur70, Jul 16, 2008.

  1. nur70

    nur70 New Member

    Joined:
    Jul 9, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Dear Sir,
    I have some questions please reply ASAP.

    1) what is the difference between global variable and static variable in context to function with suitable example.

    2)Illustrate with suitable example in C, which returning multiple values from function using pointers.

    3) How structures are different from Arrrays, justify your answer with suitable example.

    4) Distinguish between procedural language and OOP language, and explain the key features of OOP.

    Regards
    Nur
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    The answer to your question would be first 2 chapters of C++ book but I would try to explain them in short.
    global variable are global and does not have any scope but static variables in the context of the function is still local to the function but the value persists between the call to the function and does not goes out of scope.

    Return an Array's base address.

    Structure is collection of different data type where as collection of same data type.

    Refer to topic like Abstraction, Inheritence, Polymorphism
     
  3. nur70

    nur70 New Member

    Joined:
    Jul 9, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Dear Mr. Shabbir,
    Your have replied to my questions not in a professional way, please if you are expert enough in this matter founder of this site reply in a professioanl way.
    Regards,
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    What is un-proffesional about it?

    Double post is truly unprof.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice