Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Programming in C & C++ & OOP (http://www.go4expert.com/forums/programming-c-cpp-oop-t12135/)

nur70 16Jul2008 11:13

Programming in C & C++ & OOP
 
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 16Jul2008 13:40

Re: Programming in C & C++ & OOP
 
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 16Jul2008 16:51

Re: Programming in C & C++ & OOP
 
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 16Jul2008 19:54

Re: Programming in C & C++ & OOP
 
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.


All times are GMT +5.5. The time now is 12:13.