why does the execution of a c++ program start with main()???
Answer Posted / ajaykumar(me-tu)
I agree with above answer(given by Sujith). It is not
necessary the execution of program always start with main
function. Using pragma startup directive we execute any
function before executing main function. Here we give one
example in c language.
#include<stdio.h>
void print()
{
printf("\nThis is print function");
}
#pragma startup print
void main()
{
printf("\nThis is main function");
}
Output:
This is print function
This is main function
| Is This Answer Correct ? | 9 Yes | 4 No |
Post New Answer View All Answers
In what scenario does the Logical file and Physical file being used?
i wanted to know about questions about c,c++ , which is required for placements.... im a fresher
What is a standard template library (stl)? What are the various types of stl containers?
Who wrote stl?
What is a list in c++ stl?
draw a flowchart that accepts two numbers and checks if the first is divisible by the second.
What is the stl, standard template library?
How do you convert stl to steps?
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
How do I convert a stl file?
What is stl language?
How stl is different from the c++ standard library?
Explain stl.
write a program that will accept a number and print.its equivalent in words the maximum input number is 9999