Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 951403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:43:54+00:00 2026-05-15T23:43:54+00:00

Recently, I finished reading K&R with its, almost all, exercises and examples. I was

  • 0

Recently, I finished reading K&R with its, almost all, exercises and examples. I was planning to move to “Accelerated C++” that I came across Axel Schreiner’s book OOP with ANSI-C.

I am intrigued and want to learn it. But before investing time in it, I want to know the worth of implementing OOP in C. So that I can decide how much time I must spend on it.

  1. Implementing OOP in C, is it really used? Or its just for mental exercise?
  2. Are their any existing C projects that use OOP?
  3. When it is a good idea to use OOP in C?
  4. Should I invest my time in it?

I think its appropriate that I mention my background here so that you guys can guide me in a better way. I finished C, C++, Java and OOP theory about a year ago, have got a job too. But then Joel’s blog and SO made me realize that I lack in a lot many things. So I picked up the books again and start studying them properly.

K&R, Accelerated C++, Algorithm in C++ and some other books are my attempt to to improve my skills. I am not new to OOP.
So what would you suggest?

Thanks for your time.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:43:55+00:00Added an answer on May 15, 2026 at 11:43 pm

    OO is used in C as often as needed. Generally I don’t agree with the opinion that one cannot do OOP in C, as soon as you provide set of functions that operate on a given type you have OOP. Take for example, you decide to create a data structure. If you provide functions to create, add, remove, and find elements of the data structure it’s OO. Generally other languages provide syntactical sugar by automatically implying an instance variable and scoping in various properties of that instance automatically.

    1. As far as “is it really used”, the answer is yes. It’s not for mental exercise, it’s a valid paradigm in C.
    2. The best example that comes to mind is GObject, used by GLib, GTK+ and many projects unrelated to GNOME. GObject provides a way of building objects in C. However it’s not necessary to use third party support to have OO in C. Many existing projects have it, although it may not be present in the interface (a great thing in my opinion), and used internally for various purposes (cleanliness, data protection, all the usual OO justifications).
    3. It is a good idea to use OOP in C whenever you find the need to group behaviours and/or data. When you can justify the little extra syntactic expense in using your objects interface, and the time spent not actually completing your solution. Don’t get sidetracked.
    4. You should not waste time learning OO because you think it’s superior, rather it should complement your future solutions, and you should add it to your toolkit. Use it when it seems the right thing to do. Become familiar with how one does OO in C, the best way would be to do some C++, or examine any good project that uses a little C-style OO. It will seem natural to you after that.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently came across a ASP 1.1 web application that put a whole heap
I have recently finished phase 1 of my Facebook game: Rails Across Europe It
I just looked back through the project that nearly finished recently and found a
I have recently finished writing a script for Maya that exports a file containing
I recently forced myself to study C++ and I just finished reading the book
I recently finished a class that we're using to tie Access to some WCF
I finished an application recently and began profiling it for CPU & Memory usage
I recently finished the basics of a game that I'm making and I was
Recently finished reading Eric Evans Domain Driven Design (very informative, very enjoyable) however come
We've recently finished development of a web application that works as expected. When we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.