Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

In what scenario does the Logical file and Physical file being used?

2777


i wanted to know about questions about c,c++ , which is required for placements.... im a fresher

2169


What is a standard template library (stl)? What are the various types of stl containers?

1111


Who wrote stl?

1080


What is a list in c++ stl?

1117


draw a flowchart that accepts two numbers and checks if the first is divisible by the second.

3321


What is the stl, standard template library?

1038


How do you convert stl to steps?

1108


Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.

2113


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

2590


How do I convert a stl file?

1034


What is stl language?

1086


How stl is different from the c++ standard library?

1147


Explain stl.

1304


write a program that will accept a number and print.its equivalent in words the maximum input number is 9999

2970