Java Programming
C Programming
C++ Programming

How can you implement a Class in C?

Top Answer
User Avatar
Wiki User
Answered 2009-08-28 07:51:10

struct SClass{

int iNumber;

int (*fpgetValue)();

int (*fpsetValue)();


int m_Func(){

printf("\n\n Hello How are you doing,i called by function pointer");


return 1;


int _tmain(int argc, _TCHAR* argv[])




return 0;


User Avatar

Your Answer


Still Have Questions?

Related Questions

How do you implement inheritance in c plus plus?

You implement inheritance by deriving a new class of object from an existing class of object. The existing class is known as the base class of the derived class.Classes declared final cannot be used as bases classes and classes without a virtual destructor (or a virtual destructor override) cannot be used as polymorphic base classes.

Does the class can extend the class and implement interface at a time?

Yes indeed

By creating a committee on social welfare the American association of labor legislation helped to?

C. Implement health care coverage for the working class and needy

How can you implement the OOPs concepts in c?

Well we can use function pointers to implement most of the OOPs concepts in c, especially the inheritance and polymorphism.

C code to implement the file allocation algorithm?

yes we can do it,in c

Can you implement the same using c?

Some function are not using in c

Define class string and implement all the functions related to strings?

define class string

What is package Explain steps to Create Package?

package is collection of class which is implement in any class.

Write a program in C language to implement the apriori algorithm?

JavaScript is one program that has been written in C to implement the Apriori algorithm. There are also several other known programs available on the Internet that implement it as well.

Can a class implement more than one interface?

Yes, classes can implement more than one interface.To declare a class that implements an interface, you include an implements clause in the class declaration.Your class can implement more than one interface, so the implements keyword is followed by a comma-separated list of the interfaces implemented by the class.By convention, the implements clause follows the extends clause, if there is one.

Program in c to implement character destuffing?


What is the name of the rules that implement HMDA?

Reg c

Can you instantiate an interface?

No. You cannot instantiate an interface. However, you can implement the interface using a class and instantiate the class

Write a program of binary heap in c or c language?

to implement operations on binary heap in c

A stack class template in C?

I didnt get exactly what do you mean by stack class template, but this is one which implements a stack! and also shows how to implement it with templates

RF amplifier of an AM receiver is normally biased in class a class b class c?

class C because Class C also provides better signal,rejects unwanted signal.class c

Implementation of stack in C plus plus?

There is no need to implement a stack. The std::vector container class already provides push and pop methods. If the elements are different classes, simply derive those elements from a common base class.

What are adapter classes in java?

An adapter class is a class that provides a dummy (empty) implementation for an interface. That way someone who wants to implement the interface but does not want or does not know how to implement all methods, can use the adapter class instead, and only override the methods he is interested in.

Write a program to implement stack in C?

Yes, please do.

How do you implement priority queue in C using array?

answer my foot

What is more serious Class C or Class D Felony in Iowa?

Class "C"

How is c language different from fuzzy logic?

fuzzy logic is a logic which we have to implement in c language

How do you show the declaration of a multiple class inheritance?

Java does not support multiple inheritance as does C++ but similar behavior can be created by implementing multiple interfaces or using annotations. Java classes can extend only a single class but implement any number of interfaces.

What are the functions of an interface in Java?

To create an abstraction or a blueprint for a class to implement later.

What is the loops in c plus plus?

In C++ you can use 'for', 'while', and 'do while' loops, as well as procedural goto statementw to implement more complex loops. Recursion can also be used to implement looping.