answersLogoWhite

0


Best Answer
Copy

It can be done via its address, for example:

void function (void (*callback)(void))

{

(*callback)();

}

User Avatar

Wiki User

โˆ™ 2010-01-20 10:28:57
This answer is:
๐Ÿ™
1
๐Ÿคจ
0
๐Ÿ˜ฎ
0
๐Ÿ˜‚
0
User Avatar

Add your answer:

Earn +5 pts
Q: A c program to call a function without using function name?
Write your answer...
Submit

Related Questions

What is the use of function in c?

using function we can call the function in the program any where. by using functions we can reduce the code redundancy


How a program in c that will add 2 numbers without using any operator?

Not possible. Let's not forget than in C the followings are all operators:+, -+=, -=++, --=&, *, []function-call


Why functions are important in C programming?

You cannot write a C program without functions. Function increase the understanding of program. Function is reusable code ,if you want to call the function by single definition.


How do you call script code in javascript without using onclick?

function blahblah () { //do something } blahblah();


Function call in c program?

In order to use the function we need to involve it at a required place in program.this is known as function call


What differences between reentrant function and recursive function?

A reentrant function is called by the program during execution and can be interrupted and recalled later. A recursive function can call itself during execution and repeats itself without interruption.


Where is the fuction call of main function?

The main function is the entry point into a program. When the Operating System launches the program the main function gets executed.


How do you call an external function or program that is written in different programming language?

It doesn't matter what language the external program or function was written in since all executables must be converted to machine code. To execute an external function, that function must reside in a library to which your program is linked and you must know the prototype of the function you intend to call. This is usually found in the library header file which can simply be included in your program. You can then call the external function just as you would an internal function. To execute a specific function in another program, however, you must use the command line interface for that program.


How can you write a C program which multiply 2 integers without using operator?

It is not possible to do anything on a computer without using operators. Computers perform all computations using a combination of operators and operands, nothing more, nothing less. Conforming to the text of the question and assuming an operator is an infix operator as in a*b, a C program can call a function in a language other than C with numbers to be added. That would be a C program that adds without operators. Even better, a C program calls an assembly language routine (any assembler on any machine) which will use its own version of an addition command to accomplish the addition, without using an operator at all :)


How you write a c program for making a call in gcc?

int main() { // Call the printf function printf("This is a function call!\n"); return 0; }


Where do arguments appear in c program?

During function call and function definition and Declaration. These are the three places where arguments appear in C Program.


How do you accept a string by using getch() function with an example?

explain about function call


What is the difference between near and far procedure?

The far procedure is used at the place where the function call is given in main program and function definition is given in sub program....


Can you swap two numbers by call by reference outside the function?

The using of term 'call-by-reference' implies function-call, so please rethink your question...


How is system call different from function call?

a system call is to a procedure built into the operating system, such as the win32 system. a function call is to a function in a library you have linked to (included,) or to a function you have defined in your program. other than that, there's really no difference at all. it's really just semantics. you call them the exact same way.


How do you write a program that will call a function to multiply 4 numbers and return the answer to main program?

In Windows, use notepad.exe; in linux, use program xedit.


What is the difference between system call function call?

System Call is a method used by a process to request action by the operating system. A function is a subroutine and mostly part of a user program which may or may not return a value to the calling function.


Where do arguments appear within a C program?

within function call, declaration and definition


How do you write a program in C to swap two variables using a function?

To swap two variable using a function in C or C++, you need to pass the addresses, not the values, of the variables to the function. swap (int *i, int *j) { *i ^= *j; *j ^= *i; *i ^= *j; } example of call int a = 12; int b = 17; swap (&a, &b);


What is subroutine in 8085?

in 8085 microprocessor a subroutine is a separate program written aside from main program ,this program is basically the program which requires to be executed several times in the main program. the microprocessor can call subroutine any time using CALL instruction . after the subroutine is executed the subbroutine hands over the program to main program using RET instruction.


How do you write a program in C to swap two variables without using the third one with the help of call by reference?

Use the following template function to swap any two objects without using a temporary object: template<class T> void swap(T& x, T& y){x^=y^=x^=y;} Note that all objects passed to the function must provide an overload for the bitwise XOR assignment operator (^=) in order for this to work. However, primitive types such as int and char can be passed to this template function without the need for any additional code.


Advantages of using C function?

* Debugging is easier * It is easier to understand the logic involved in the program * Testing is easier * Recursive call is possible * Irrelevant details in the user point of view are hidden in functions * Functions are helpful in generalizing the program


What is dfference between synchronization and asynchronization?

I believe you mean synchronous and asynchronous... as in calling a function synchronously or asynchronously. When you call a function synchronously, the program waits for the function to finish before continuing on... i = i + 1 DoSomething() j = j + 1 <---- j wouldn't be changed until DoSomething finished When you call a function asynchronously, the program spawns another thread to run the function and continues on without waiting for the function to finish... Thread t i = i + 1 t.Start ( DoSomething ) j = j + 1 <---- j be changed just after DoSomething started


What are three advantages of using function?

The 3 main advantages of functions are: 1.Re-usability. 2.We can call it from anywhere of the program. 3.User-defined functions can also created.


Which operator require to call c function using object name?

The operator required to call c function using object name is function object. Other operator names that deal with objects are structure dereference, structure reference, and indirection