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...

wap to print "hello world" without using the main function.

Answer Posted / ranjan

#include<stdio.h>
#include<iostream.h>
class World
{
public:
World()
{
printf("Hello world");
}
}

world w1;


Here the object is declared globaly.so when the object is
defined it will call the constructor of that & that will
display the "hello world". no need to write main. as it is
global.

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why isn't any of this standardized in c? Any real program has to do some of these things.

1213


In which layer of the network datastructure format change is done

1890


What is the use of f in c?

982


What is extern variable in c with example?

997


What is an identifier?

1036


What is typedef struct in c?

1050


What is %d used for?

1042


if p is a string contained in a string?

1851


Differentiate between Macro and ordinary definition.

1383


The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

1255


What are the keywords in c?

1125


How can you access memory located at a certain address?

1121


What is a stream in c programming?

1155


Is it valid to address one element beyond the end of an array?

1175


How do you define a string?

1103