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 / andy

Ranjan's answer was the correct one. And it's what interviewers expect.

use g++ to compile and run this:

#include<stdio.h>
#include<iostream>

class World
{
public:
World()
{
printf("Hello world\n");
}
};

World w1;

int main()
{
printf("Hello world again!!\n");
return 0;
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is c token?

1036


write a c program to calculate sum of digits till it reduces to a single digit using recursion

3271


What is indirection? How many levels of pointers can you have?

1106


Why isnt there a numbered, multi-level break statement to break out

1018


Do pointers need to be initialized?

1046


What is malloc() function?

1117


What does sizeof function do?

1152


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2713


What type of function is main ()?

1017


Is c procedural or functional?

995


What is string in c language?

1099


Is flag a keyword in c?

1125


Why is a semicolon (;) put at the end of every program statement?

1051


What is anagram in c?

896


What is wrong with this code?

1147