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
Can we use visual studio for c?
What are the types of assignment statements?
What is pointer to pointer in c language?
Can the curly brackets { } be used to enclose a single line of code?
What is a stream water?
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
what is use of malloc and calloc?
What are the advantages and disadvantages of a heap?
Explain threaded binary trees?
What is d'n in c?
What is the use of function in c?
What is indirection in c?
Write a C program in Fibonacci series.
Why C language is a procedural language?
Explain how can I prevent another program from modifying part of a file that I am modifying?