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 are local static variables? How can you use them?

1147


What is calloc in c?

1139


What’s the special use of UNIONS?

1152


What is the difference between char array and char pointer?

1050


How can you invoke another program from within a C program?

1073


Between macros and functions,which is better to use and why?

2218


What are the application of c?

1094


while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

1238


Explain the difference between ++u and u++?

1132


code for replace tabs with equivalent number of blanks

2157


How can I pad a string to a known length?

1032


What do you mean by invalid pointer arithmetic?

1072


Explain how can I write functions that take a variable number of arguments?

1076


What does it mean when a pointer is used in an if statement?

1106


What is class and object in c?

1117