answersLogoWhite

0


Best Answer

Empty parenthesis is a self invoked function that is executed immediately after its created. IT makes the function an expression and any subsequent function, the call.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why you have to put empty parathensis after main function?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What are the example of turbo c with using scan and print function?

#include<stdio.h> Void main() { int a,b; printf("Enter a Number: "); // for print function as an out-put scanf("%d",&a); //for scan function as in input /* Here we can use print function once again as: */ a=a++; printf("%d",a); }


What is the purpose of the program stack?

Its main use is to store local variables, arguments and return address each time a function is called.When your program calls a function the following happen :- The function arguments are put on the stack- The current instruction pointer is put on the stack- The program jumps to the start of the function- Space is allocated on the stack to hold local variables- The function executes- The space holding local variables is de-allocated- The instruction pointer is restored and removed from the stack (we are now leaving the function and resuming the calling procedure)- The arguments are removed from the stack


Where are scripts placed in an HTML document?

you can put your script into a function. A function contains code that will be executed by an event or by a call to the function.


Which function is used to determine the position of the put pointer in the file?

pos_type tellp();


How can you pass a function name as argument of another function?

== == Let me correct the Q. Strictly speaking, You never pass a function name to another function, you actually pass function address as argument to another function. However, since the function name automatically resolves into function address, it could be deemed correct to say that you pass function name. Now, the answer: If you're talking about function pointers: void Foo(double (*fptr)(int), int x, int y); double Bar(int i); int main() { Foo(&Bar, 1, 2); /*Previous Line passes Bar's address to Foo. The & behind Bar is optional because it's implicit, but I put it there to emphasize that it's the address of Bar being passed.*/ return 0; } void Foo(double (*fptr)(int), int x, int y) { (*fptr)(10); /*Previous line will call Bar(10) because main passed it Bar's address. Explicitly declaring the dereference is not required, however I explicitly wrote it in to emphasize that it is a pointer that is getting dereferenced.*/ //do something } double Bar(int i) { //do something return 0; } Note, the function pointer must have the same parameter list as the function you are trying to set the function pointer equal to.

Related questions

What is the main purpose of the video camera?

It is the charged couple device. The primary function of a video camera is to record.


How many oranges can you put in empty box?

If we put oranges one by one then One orange, because once an orange is placed in the box, it is no longer empty. But if we put some oranger at same time then, many


How many coats can you put in an empty wardboard?

One. (After that, it isn't empty!)


What is the function of src folder in android?

In Android Development the src folder is where all you put your main Java code


What is the main function of the blood cells?

They hold your blood in a cell. Just like bad guys, they are put into cells.


How do you get bottle stoppers off empty bottles?

Put the empty bottle near a fire.


Can you put R22 in your empty R134 system?

NO ! and Why?


What is the answer to this riddle - What do you fill with empty hands?

The answer to this riddle is gloves. You put your empty hands into a pair of gloves.


What are the example of turbo c with using scan and print function?

#include<stdio.h> Void main() { int a,b; printf("Enter a Number: "); // for print function as an out-put scanf("%d",&a); //for scan function as in input /* Here we can use print function once again as: */ a=a++; printf("%d",a); }


How do you get the vial to put the potion in on Steamworks Island?

There is an empty beaker in the Museum on Main Street. Use the machine to climb up at right, then cross left, then climb to the upper right of the room.


How many eggs can you put in an empty basket one foot in diameter?

only 1 then it doesnt remain empty anymore


Delete empty files on desktop?

Put then in the trash bin