What's the equivalent call() apply() of JavaScript in C?

In Java it is:

  • java.lang.reflect.Method

In JavaScript it is:

  • apply() ⟶ more like java.lang.reflect.Method

  • call() ⟶ more like function pointer in C

In C it is:

  • type (*varname)(Type1 label1,Type2 label2,Type3 label3) ⟶ call()

  • What is the equivalent in C of apply() or java.lang.reflect.Method?

------------i am pretty slow, the answer from eyalm:

the caller perceive the callee as :

  • int (*a)(char value);

and the callee perceive the stack frame as :

  • Type (*varname)(Type1 label1,Type2 label2,Type3 label3 ...)

---- am i right?


For the function pointer:

int (*a)(char *);

you can call with ... wait for it ...


Need Your Help

How to disable jNiceIt select tag?

javascript jquery

I have jNiceIT plugin for Jquery. How can i disable the select dropdown styled with jNiceIt?

Moment.js and Unix Epoch Conversion

javascript date epoch momentjs

I have a web service that is returning a date as the following string:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.