Programming in C & C++ & OOP

nur70's Avatar, Join Date: Jul 2008
Newbie Member
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
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
The answer to your question would be first 2 chapters of C++ book but I would try to explain them in short.
Quote:
Originally Posted by nur70
1) what is the difference between global variable and static variable in context to function with suitable example.
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.

Quote:
Originally Posted by nur70
2)Illustrate with suitable example in C, which returning multiple values from function using pointers.
Return an Array's base address.

Quote:
Originally Posted by nur70
3) How structures are different from Arrrays, justify your answer with suitable example.
Structure is collection of different data type where as collection of same data type.

Quote:
Originally Posted by nur70
4) Distinguish between procedural language and OOP language, and explain the key features of OOP.
Refer to topic like Abstraction, Inheritence, Polymorphism
nur70's Avatar, Join Date: Jul 2008
Newbie Member
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,
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by nur70
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,
What is un-proffesional about it?

Double post is truly unprof.